[llvm-dev] Linking with Clang on the command line? (And using LLVM with VS2017 IDE)
Osman Zakir via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 4 14:12:11 PST 2018
I'm messaging the list about this again.
I built LLVM, though I may need to do it again since I did both Release and Debug configurations in the same sitting back to back and am worried that it may have been the wrong thing to do (and I can't find the C++ standard headers and library files even though I used the flag for enabling projects to also enable libcxx as well when generating project files with CMake. It could also be that only be built ALL_BUILD.vcxproj and INSTALL.vcxproj and nothing else).
I just want to know how to link third-party libraries when trying to use LLD with Clang on the command line on Windows. I was using the Developer Command Prompt for VS 2017 and I tried to link the library by doing "-L /path/to/library-file.lib". That seems to be wrong because I had linker errors. How do I provide input files to the linker once I've provided the library search path with the -L flag? As I understood it, the -L flag is for the library search path and the -l flag is for the input file to search for, but when I tried to do it earlier I kept getting errors still. I tried linking Boost.System by doing it like this: "-lboost_system-vc141-mt-x64-1_68" (since the actual filename is libboost_system-vc141-x64-1_68.lib and I've heard that Clang and GCC don't need the "lib" part at the beginning and ending of the filename). So how do I actually do it?
And I also want to know how to use LLVM as the toolchain instead of MSVC in the VS2017 IDE. I only have Clang version 3.7.0 enabled as toolset options. How do I use the LLVM/Clang version that I built?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev