{"action":"created","issue":{"url":"https://api.github.com/repos/jimon/premake-ninja/issues/8","labels_url":"https://api.github.com/repos/jimon/premake-ninja/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/jimon/premake-ninja/issues/8/comments","events_url":"https://api.github.com/repos/jimon/premake-ninja/issues/8/events","html_url":"https://github.com/jimon/premake-ninja/pull/8","id":115582933,"number":8,"title":"Fix link command for C++","user":{"login":"iwadon","id":20000,"avatar_url":"https://avatars.githubusercontent.com/u/20000?v=3","gravatar_id":"","url":"https://api.github.com/users/iwadon","html_url":"https://github.com/iwadon","followers_url":"https://api.github.com/users/iwadon/followers","following_url":"https://api.github.com/users/iwadon/following{/other_user}","gists_url":"https://api.github.com/users/iwadon/gists{/gist_id}","starred_url":"https://api.github.com/users/iwadon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iwadon/subscriptions","organizations_url":"https://api.github.com/users/iwadon/orgs","repos_url":"https://api.github.com/users/iwadon/repos","events_url":"https://api.github.com/users/iwadon/events{/privacy}","received_events_url":"https://api.github.com/users/iwadon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-06T20:38:53Z","updated_at":"2015-11-06T21:19:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jimon/premake-ninja/pulls/8","html_url":"https://github.com/jimon/premake-ninja/pull/8","diff_url":"https://github.com/jimon/premake-ninja/pull/8.diff","patch_url":"https://github.com/jimon/premake-ninja/pull/8.patch"},"body":"Hi, I'm premake newbie.\r\nNow premake-ninja failed on linking with language=\"CXX\".\r\n\r\npremake5.lua:\r\n\r\n```lua\r\nrequire \"ninja\"\r\n\r\nsolution \"hello\"\r\n\tlocation \"build\"\r\n\tconfigurations {\"debug\", \"release\"}\r\n\r\nproject \"hello\"\r\n\tkind \"ConsoleApp\"\r\n\tlocation \"build\"\r\n\tlanguage \"C++\"\r\n\t-- language \"C\"\r\n\ttargetdir \"build/bin_%{cfg.buildcfg}\"\r\n\tfiles {\"hello.cc\"}\r\n\tfilter \"configurations:debug\"\r\n\t\tdefines {\"DEBUG\"}\r\n\t\tflags {\"Symbols\"}\r\n\tfilter \"configurations:release\"\r\n\t\tdefines {\"NDEBUG\"}\r\n\t\toptimize \"On\"\r\n```\r\n\r\nhello.cc:\r\n\r\n```c++\r\n#include <iostream>\r\nint main()\r\n{\r\n  std::cout << \"Hello.\" << std::endl;\r\n  return 0;\r\n}\r\n```\r\n\r\nbuild log on my Mac:\r\n\r\n```console\r\nimac:~/src/premake-ninja-example1% ninja -C build\r\nninja: Entering directory `build'\r\n[1/1] link bin_debug/hello\r\nFAILED: clang -o bin_debug/hello obj/debug/hello.o  \r\nUndefined symbols for architecture x86_64:\r\n  \"std::__1::locale::use_facet(std::__1::locale::id&) const\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::ios_base::getloc() const\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init(unsigned long, char)\", referenced from:\r\n      std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in hello.o\r\n  \"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()\", referenced from:\r\n      std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in hello.o\r\n  \"std::__1::basic_ostream<char, std::__1::char_traits<char> >::put(char)\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n  \"std::__1::basic_ostream<char, std::__1::char_traits<char> >::flush()\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n  \"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::sentry(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::basic_ostream<char, std::__1::char_traits<char> >::sentry::~sentry()\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::cout\", referenced from:\r\n      _main in hello.o\r\n  \"std::__1::ctype<char>::id\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::locale::~locale()\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::ios_base::__set_badbit_and_consider_rethrow()\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::__1::ios_base::clear(unsigned int)\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"std::terminate()\", referenced from:\r\n      ___clang_call_terminate in hello.o\r\n  \"___cxa_begin_catch\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n      ___clang_call_terminate in hello.o\r\n  \"___cxa_end_catch\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n  \"___gxx_personality_v0\", referenced from:\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::endl<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) in hello.o\r\n      std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) in hello.o\r\n      std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) in hello.o\r\n      Dwarf Exception Unwind Info (__eh_frame) in hello.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nninja: build stopped: subcommand failed.\r\n[1]    30317 exit 1     ninja -C build\r\n```\r\n\r\nI think that because link command for C language is used.\r\nTherefore, I have fixed to work in the same way as the official gmake action.\r\nSee https://github.com/premake/premake-core/blob/master/src/actions/make/make_cpp.lua#L446 .\r\n"},"comment":{"url":"https://api.github.com/repos/jimon/premake-ninja/issues/comments/154544478","html_url":"https://github.com/jimon/premake-ninja/pull/8#issuecomment-154544478","issue_url":"https://api.github.com/repos/jimon/premake-ninja/issues/8","id":154544478,"user":{"login":"jimon","id":1333661,"avatar_url":"https://avatars.githubusercontent.com/u/1333661?v=3","gravatar_id":"","url":"https://api.github.com/users/jimon","html_url":"https://github.com/jimon","followers_url":"https://api.github.com/users/jimon/followers","following_url":"https://api.github.com/users/jimon/following{/other_user}","gists_url":"https://api.github.com/users/jimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimon/subscriptions","organizations_url":"https://api.github.com/users/jimon/orgs","repos_url":"https://api.github.com/users/jimon/repos","events_url":"https://api.github.com/users/jimon/events{/privacy}","received_events_url":"https://api.github.com/users/jimon/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T21:19:03Z","updated_at":"2015-11-06T21:19:03Z","body":"Thanks for fix, just short question about ```.``` :)"}}