I couldn't get it to build libcxx... <div>You need c++ and c++abi to compile c++ code. <br><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 12, 2018, 07:01 Osman Zakir via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>LLVM on a Developer Command Prompt.  The ones I want to fix first are the ones from Boost and Jinja2Cpp.  I saw some from those as well.  </span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>If there any standard library ones missing, could it be because I couldn't get it to build libcxx?  I did try to include that, but it seems to be missing.  What should I do?</span></div>
<div id="m_-2475028943683970045appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_-2475028943683970045divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> David Greene <<a href="mailto:dag@cray.com" target="_blank">dag@cray.com</a>><br>
<b>Sent:</b> Wednesday, December 12, 2018 3:30 AM<br>
<b>To:</b> Osman Zakir<br>
<b>Cc:</b> blubee blubeeme; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a></font></div></div><div dir="ltr"><div id="m_-2475028943683970045divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><br>
<b>Subject:</b> Re: [llvm-dev] Using LLD to link against third-party libraries? How?</font>
<div> </div>
</div>
<div class="m_-2475028943683970045BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="m_-2475028943683970045PlainText">Are you linking with a C++ compiler?  A lot of those missing symbols<br>
look like they come from the C++ standard library.<br>
<br>
                          -David<br>
<br>
Osman Zakir via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> @blubee blubeeme So what do you think? Got any ideas?<br>
> ----------------------------------------------------------------------<br>
> From: Osman Zakir <<a href="mailto:osmanzakir90@hotmail.com" target="_blank">osmanzakir90@hotmail.com</a>><br>
> Sent: Wednesday, December 12, 2018 1:43 AM<br>
> To: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> Subject: Re: [llvm-dev] Using LLD to link against third-party<br>
> libraries? How? <br>
> In my code here <a href="https://github.com/DragonOsman/currency_converter" target="_blank">https://github.com/DragonOsman/currency_converter</a> , I<br>
> used C++17 and managed to get it to work (though I'm only using<br>
> std::map::insert_or_assign() from C++17). And I'm using Windows, so I<br>
> shouldn't use LDFLAGS or CXXFLAGS as environment variables. I'll use<br>
> them directly on the compiler command line instead. The libraries I<br>
> need to link against are<br>
> C:/boost_1_68_0/stage/lib/libboost_system-vc141-mt-x64-1_68.lib and<br>
> C:/Jinja2Cpp/install_x64/lib/static/jinja2cpp.lib.<br>
><br>
> I tried to build it with this flag:<br>
> "<br>
> clang++ -std=c++17 -Wall -pedantic -<br>
> D_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING -<br>
> Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD -<br>
> D_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING -<br>
> D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32 -<br>
> D_WIN32_WINDOWS -D_NDEBUG -fexceptions -<br>
> IC:/Jinja2Cpp/install_x64/include -IC:/json/single_include -<br>
> IC:/boost_1_68_0 -<br>
> LC:/boost_1_68_0/stage/lib/libboost_system-vc141-mt-x64-1_68.lib -<br>
> LC:/Jinja2Cpp/install_x64/lib/static/jinja2cpp.lib<br>
> currency_converter.cpp -o currency_converter.exe<br>
> "<br>
> And I got these warnings and errors from LLD:<br>
><br>
> " <br>
> lld-link: warning:<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o: locally<br>
> defined symbol imported: __std_terminate (defined in libvcruntime.lib<br>
> (ehhelpers.obj)) [LNK4217]<br>
> lld-link: error: undefined symbol: "public: __cdecl<br>
> jinja2::Template::Template(class jinja2::TemplateEnv *)"<br>
> (??0Template@jinja2@@QEAA@PEAVTemplateEnv@1@@Z)​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("void _<br>
> _cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> boost::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)"<br>
> (??$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $allocator@D@std@@AEAUsend_lambda@server_session@@@@YAXV?$basic_string_<br>
> view@DU?$char_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic_string_<br>
> body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_<br>
> fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_session@@PEBD3@Z)<br>
> )​<br>
> ​ <br>
> lld-link: error: undefined symbol: "public: class<br>
> nonstd::expected_lite::expected<void, class<br>
> jinja2::ErrorInfoTpl<char>> __cdecl jinja2::Template::LoadFromFile<br>
> (class std::basic_string<char, struct std::char_traits<char>, class<br>
> std::allocator<char>> const &)"<br>
> (?LoadFromFile@Template@jinja2@@QEAA?AV?$expected@XV?$ErrorInfoTpl@D@jinja2@@@expected_<br>
> lite@nonstd@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)<br>
> ​ <br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("void _<br>
> _cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> boost::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)"<br>
> (??$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $allocator@D@std@@AEAUsend_lambda@server_session@@@@YAXV?$basic_string_<br>
> view@DU?$char_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic_string_<br>
> body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_<br>
> fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_session@@PEBD3@Z)<br>
> )​<br>
> ​ <br>
> lld-link: error: undefined symbol: "public: class<br>
> std::basic_string<char, struct std::char_traits<char>, class<br>
> std::allocator<char>> __cdecl jinja2::Template::RenderAsString(class<br>
> std::unordered_map<class std::basic_string<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> jinja2::Value, struct std::hash<class std::basic_string<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>>, struct<br>
> std::equal_to<class std::basic_string<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>>, class<br>
> std::allocator<struct std::pair<class std::basic_string<char, struct<br>
> std::char_traits<char>, class std::allocator<char>> const, class<br>
> jinja2::Value>>> const &)"<br>
> (?RenderAsString@Template@jinja2@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?<br>
> $allocator@D@2@@std@@AEBV?$unordered_map@V?$basic_string@DU?$char_traits@D@std@@V?<br>
> $allocator@D@2@@std@@VValue@jinja2@@U?$hash@V?$basic_string@DU?$char_traits@D@std@@V?<br>
> $allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?<br>
> $allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_<br>
> traits@D@std@@V?$allocator@D@2@@std@@VValue@jinja2@@@std@@@2@@4@@Z)​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("void _<br>
> _cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> boost::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)"<br>
> (??$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $allocator@D@std@@AEAUsend_lambda@server_session@@@@YAXV?$basic_string_<br>
> view@DU?$char_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic_string_<br>
> body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_<br>
> fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_session@@PEBD3@Z)<br>
> )​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("void _<br>
> _cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> boost::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)"<br>
> (??$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $allocator@D@std@@AEAUsend_lambda@server_session@@@@YAXV?$basic_string_<br>
> view@DU?$char_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic_string_<br>
> body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_<br>
> fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_session@@PEBD3@Z)<br>
> )​<br>
> ​ <br>
> lld-link: error: undefined symbol: "public: __cdecl<br>
> jinja2::Template::~Template(void)" (??1Template@jinja2@@QEAA@XZ)​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("void _<br>
> _cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> boost::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)"<br>
> (??$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $allocator@D@std@@AEAUsend_lambda@server_session@@@@YAXV?$basic_string_<br>
> view@DU?$char_traits@D@std@@@boost@@$$QEAU?$message@$00U?$basic_string_<br>
> body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_<br>
> fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_session@@PEBD3@Z)<br>
> )​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("int<br>
> `void __cdecl handle_request<struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> std::allocator<char>, struct server_session::send_lambda &>(class<br>
> boost::basic_string_view<char, struct std::char_traits<char>>, struct<br>
> basic_string_view<char, struct<br>
> std::char_traits<char>>::beast::http::message<1, struct<br>
> boost::beast::http::basic_string_body<char, struct<br>
> std::char_traits<char>, class std::allocator<char>>, class<br>
> boost::beast::http::basic_fields<class std::allocator<char>>> &&,<br>
> struct server_session::send_lambda &, char const *, char const *)'::<br>
> `1'::dtor$114"<br>
> (?dtor$114@?0???$handle_request@U?$basic_string_body@DU?$char_traits@D@std@@V?<br>
> $allocator@D@2@@http@beast@boost@@V?$allocator@D@std@@AEAUsend_lambda@server_<br>
> session@@@@YAXV?$basic_string_view@DU?$char_traits@D@std@@@boost@@$$QEAU?<br>
> $message@$00U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?<br>
> $basic_fields@V?$allocator@D@std@@@234@@http@beast@1@AEAUsend_lambda@server_<br>
> session@@PEBD3@Z@4HA))​<br>
> ​ <br>
> lld-link: warning:<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o: locally<br>
> defined symbol imported: _CxxThrowException (defined in<br>
> libvcruntime.lib(throw.obj)) [LNK4217]​<br>
> lld-link: error: undefined symbol: "class<br>
> boost::system::error_category const & __cdecl<br>
> boost::system::detail::system_category_ncx(void)"<br>
> (?system_category_ncx@detail@system@boost@@YAAEBVerror_category@23@XZ)​<br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("class<br>
> boost::system::error_category const & __cdecl<br>
> boost::system::system_category(void)"<br>
> (?system_category@system@boost@@YAAEBVerror_category@12@XZ))​<br>
> ​ <br>
> lld-link: warning:<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o: locally<br>
> defined symbol imported: __RTDynamicCast (defined in libvcruntime.lib<br>
> (rtti.obj)) [LNK4217]​<br>
> lld-link: error: undefined symbol: "class<br>
> boost::system::error_category const & __cdecl<br>
> boost::system::detail::generic_category_ncx(void)"<br>
> (?generic_category_ncx@detail@system@boost@@YAAEBVerror_category@23@XZ)<br>
> ​ <br>
>>>> referenced by<br>
> C:\Users\Osman\AppData\Local\Temp\currency_converter-264ae1.o:("class<br>
> boost::system::error_category const & __cdecl<br>
> boost::system::generic_category(void)"<br>
> (?generic_category@system@boost@@YAAEBVerror_category@12@XZ))​<br>
> clang++: error: linker command failed with exit code 1 (use -v to see<br>
> invocation)<br>
> "<br>
><br>
>                                                                      <br>
>  * GitHub - DragonOsman/currency_converter: Application for Computer <br>
>    Science course                                                    <br>
>    Google Maps + Currency Converter Web Application. Application for <br>
>    Computer Science course. This is a currency converter web         <br>
>    application with the frontend and a backend.                      <br>
>    <a href="http://github.com" target="_blank">github.com</a>                                                        <br>
>                                                                      <br>
> *<br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div>
</span></font></div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>