<div dir="auto">The source code of the relevant projects isn't quite as relevant as the error messages from lld itself. Unless the errors are somehow specific to lld, it's less likely to get the best help on this list. <div dir="auto"><br></div><div dir="auto">Common errors are unresolved symbols, is that the error you're getting? </div><div dir="auto"><br></div><div dir="auto">"I want to know how to link third-party libraries into my code using the lld linker" -- there is not much to it. lld works mostly just like ld, and if clang is your driver anyways it should be nigh identical.</div><div dir="auto"><br></div><div dir="auto">There's a subtle difference between the BFD ld and lld regarding how libraries are implicitly grouped. But I'd say it's not a likely first place to look. Can you successfully link using ld/gold? Or I suppose in your case the known-good baseline might be with LINK.EXE?<br></div><div dir="auto"><br></div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Sun, Dec 2, 2018, 1:07 PM 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">
Also, there's one more thing related to that: how do I fix warnings like this one? "lld-link: warning: C:\Users\Osman\AppData\Local\Temp\currency_converter-7276bd.o: locally defined symbol imported: __RTDynamicCast (defined in libvcruntime.lib(rtti.obj)) [LNK4217]"
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_4015943810135283058divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Osman Zakir <<a href="mailto:osmanzakir90@hotmail.com" target="_blank" rel="noreferrer">osmanzakir90@hotmail.com</a>><br>
<b>Sent:</b> Sunday, December 2, 2018 11:51 PM<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Linking third-party libraries using lld?</font>
<div> </div>
</div>
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>I still need answer to my question about how to make sure that libcxx and libcxxabi are also built after enabling them, but I have another problem right now. I want to know how to link third-party libraries into my code using the lld linker. I have
this code: </span><a id="m_4015943810135283058LPlnk802370" href="https://github.com/DragonOsman/currency_converter" target="_blank" rel="noreferrer">https://github.com/DragonOsman/currency_converter</a></div>
<div class="m_4015943810135283058x_LPBorder857227" id="m_4015943810135283058LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL0RyYWdvbk9zbWFuL2N1cnJlbmN5X2NvbnZlcnRlcg.." style="width:100%;margin-top:16px;margin-bottom:16px;min-width:424px;max-width:800px">
<table id="m_4015943810135283058LPContainer857227" style="padding:12px 36px 12px 12px;border-radius:2px;border:1px solid rgb(200,200,200);width:100%">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="m_4015943810135283058LPImageContainer857227" style="height:160px;overflow:hidden;margin-right:12px">
<a id="m_4015943810135283058LPImageAnchor857227" href="https://github.com/DragonOsman/currency_converter" target="_blank" rel="noreferrer"><font color="#b00000"></font><font color="#007600"></font><font color="#b01100"></font><img width="160" height="160" id="m_4015943810135283058LPThumbnailImageId857227" alt="" style="display:block" src="https://avatars0.githubusercontent.com/u/18173932?s=400&v=4"></a></div>
</td>
<td style="width:100%">
<div id="m_4015943810135283058LPTitle857227" style="font-family:"wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:21px;font-weight:300;margin-right:8px;margin-bottom:12px">
<a id="m_4015943810135283058LPUrlAnchor857227" href="https://github.com/DragonOsman/currency_converter" style="text-decoration:none" target="_blank" rel="noreferrer">GitHub - DragonOsman/currency_converter: Application for Computer Science course</a></div>
<div id="m_4015943810135283058LPDescription857227" style="color:rgb(102,102,102);overflow:hidden;font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;margin-right:8px;margin-bottom:12px;max-height:100px">
Google Maps + Currency Converter Web Application. Application for Computer Science course. This is a currency converter web application with the frontend and a backend.</div>
<div id="m_4015943810135283058LPMetadata857227" style="color:rgb(166,166,166);font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;font-weight:400">
<a href="http://github.com" target="_blank" rel="noreferrer">github.com</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
and I'm trying to compile it using clang++ with the following command:</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
"</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
clang++ -std=c++17 -fuse-ld=lld -Wall -pedantic -m64 -D_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING -Dvariant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD -D_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS
-D_WIN32 -D_WIN32_WINDOWS -D_NDEBUG -D_MBCS -IC:/boost_1_68_0 -IC:/Jinja2Cpp/install_x64/include -IC:/json/single_include -LC:/boost_1_68_0/stage/lib/libboost_system-vc141-mt-x64-1_68.lib -LC:/Jinja2Cpp/install_x64/lib/static/jinja2cpp.lib currency_converter.cpp
-o currency_converter.exe</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
"</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
But I have still have linker errors from Jinja2Cpp and Boost.System. Jinja2Cpp's source code and documentation is on GitHub here:
<a id="m_4015943810135283058LPlnk557600" href="https://github.com/flexferrum/Jinja2Cpp/" target="_blank" rel="noreferrer">https://github.com/flexferrum/Jinja2Cpp/</a> . </div>
<div class="m_4015943810135283058x_LPBorder365778" id="m_4015943810135283058LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL2ZsZXhmZXJydW0vSmluamEyQ3BwLw.." style="width:100%;margin-top:16px;margin-bottom:16px;min-width:424px;max-width:800px">
<table id="m_4015943810135283058LPContainer365778" style="padding:12px 36px 12px 12px;border-radius:2px;border:1px solid rgb(200,200,200);width:100%">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="m_4015943810135283058LPImageContainer365778" style="height:160px;overflow:hidden;margin-right:12px">
<a id="m_4015943810135283058LPImageAnchor365778" href="https://github.com/flexferrum/Jinja2Cpp/" target="_blank" rel="noreferrer"><img width="160" height="160" id="m_4015943810135283058LPThumbnailImageId365778" alt="" style="display:block" src="https://avatars3.githubusercontent.com/u/1494258?s=400&v=4"></a></div>
</td>
<td style="width:100%">
<div id="m_4015943810135283058LPTitle365778" style="font-family:"wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:21px;font-weight:300;margin-right:8px;margin-bottom:12px">
<a id="m_4015943810135283058LPUrlAnchor365778" href="https://github.com/flexferrum/Jinja2Cpp/" style="text-decoration:none" target="_blank" rel="noreferrer">GitHub - flexferrum/Jinja2Cpp: Jinja2 C++ (and for C++) almost full-conformance template engine implementation</a></div>
<div id="m_4015943810135283058LPDescription365778" style="color:rgb(102,102,102);overflow:hidden;font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;margin-right:8px;margin-bottom:12px;max-height:100px">
Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.</div>
<div id="m_4015943810135283058LPMetadata365778" style="color:rgb(166,166,166);font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;font-size:14px;font-weight:400">
<a href="http://github.com" target="_blank" rel="noreferrer">github.com</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br></a><br>
</blockquote></div></div>