Osman Zakir via llvm-dev
2018-Dec-02 18:51 UTC
[llvm-dev] Linking third-party libraries using lld?
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: https://github.com/DragonOsman/currency_converter [https://avatars0.githubusercontent.com/u/18173932?s=400&v=4]<https://github.com/DragonOsman/currency_converter> GitHub - DragonOsman/currency_converter: Application for Computer Science course<https://github.com/DragonOsman/currency_converter> Google Maps + Currency Converter Web Application. Application for Computer Science course. This is a currency converter web application with the frontend and a backend. github.com and I'm trying to compile it using clang++ with the following command: " 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 " But I have still have linker errors from Jinja2Cpp and Boost.System. Jinja2Cpp's source code and documentation is on GitHub here: https://github.com/flexferrum/Jinja2Cpp/ . [https://avatars3.githubusercontent.com/u/1494258?s=400&v=4]<https://github.com/flexferrum/Jinja2Cpp/> GitHub - flexferrum/Jinja2Cpp: Jinja2 C++ (and for C++) almost full-conformance template engine implementation<https://github.com/flexferrum/Jinja2Cpp/> Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together. github.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181202/8e841051/attachment.html>
Osman Zakir via llvm-dev
2018-Dec-02 19:07 UTC
[llvm-dev] Linking third-party libraries using lld?
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]" ________________________________ From: Osman Zakir <osmanzakir90 at hotmail.com> Sent: Sunday, December 2, 2018 11:51 PM To: llvm-dev at lists.llvm.org Subject: Linking third-party libraries using lld? 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: https://github.com/DragonOsman/currency_converter [https://avatars0.githubusercontent.com/u/18173932?s=400&v=4]<https://github.com/DragonOsman/currency_converter> GitHub - DragonOsman/currency_converter: Application for Computer Science course<https://github.com/DragonOsman/currency_converter> Google Maps + Currency Converter Web Application. Application for Computer Science course. This is a currency converter web application with the frontend and a backend. github.com and I'm trying to compile it using clang++ with the following command: " 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 " But I have still have linker errors from Jinja2Cpp and Boost.System. Jinja2Cpp's source code and documentation is on GitHub here: https://github.com/flexferrum/Jinja2Cpp/ . [https://avatars3.githubusercontent.com/u/1494258?s=400&v=4]<https://github.com/flexferrum/Jinja2Cpp/> GitHub - flexferrum/Jinja2Cpp: Jinja2 C++ (and for C++) almost full-conformance template engine implementation<https://github.com/flexferrum/Jinja2Cpp/> Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together. github.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181202/e7d7cf28/attachment.html>
Brian Cain via llvm-dev
2018-Dec-03 03:33 UTC
[llvm-dev] Linking third-party libraries using lld?
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. Common errors are unresolved symbols, is that the error you're getting? "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. 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? On Sun, Dec 2, 2018, 1:07 PM Osman Zakir via llvm-dev < llvm-dev at lists.llvm.org wrote:> 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]" > > > ------------------------------ > *From:* Osman Zakir <osmanzakir90 at hotmail.com> > *Sent:* Sunday, December 2, 2018 11:51 PM > *To:* llvm-dev at lists.llvm.org > *Subject:* Linking third-party libraries using lld? > > 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: > https://github.com/DragonOsman/currency_converter > <https://github.com/DragonOsman/currency_converter> > GitHub - DragonOsman/currency_converter: Application for Computer Science > course <https://github.com/DragonOsman/currency_converter> > Google Maps + Currency Converter Web Application. Application for Computer > Science course. This is a currency converter web application with the > frontend and a backend. > github.com > and I'm trying to compile it using clang++ with the following command: > " > 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 > " > > But I have still have linker errors from Jinja2Cpp and Boost.System. > Jinja2Cpp's source code and documentation is on GitHub here: > https://github.com/flexferrum/Jinja2Cpp/ . > <https://github.com/flexferrum/Jinja2Cpp/> > GitHub - flexferrum/Jinja2Cpp: Jinja2 C++ (and for C++) almost > full-conformance template engine implementation > <https://github.com/flexferrum/Jinja2Cpp/> > Join GitHub today. GitHub is home to over 28 million developers working > together to host and review code, manage projects, and build software > together. > github.com > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181202/ce90eecd/attachment.html>
Reasonably Related Threads
- Using LLD to link against third-party libraries? How?
- Using LLD to link against third-party libraries? How?
- Using LLD to link against third-party libraries? How?
- Using LLD to link against third-party libraries? How?
- Using LLD to link against third-party libraries? How?