[llvm-dev] Using LLD to link against third-party libraries? How?
Zachary Turner via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 14 14:30:18 PST 2018
Unfortunately things aren't quite that simple. When you use a library it
has to be compatible with other libraries you might be using. In this case
you're running into at least 1 issue, maybe 2. The first one is that you
(probably) downloaded a precompiled binary for boost, and that library was
built against Microsoft's standard library. It expects, at link time, to
be able to resolve all the symbols that it requires. But then you're
specifying a different standard library, so it isn't going to work.
One solution is to compile boost yourself with libc++, but then you are
likely to run into problem 2, which is that libc++ support on Windows is
not as good as it is on other platforms. I think it will "probably" work
for simple cases, but boost is not a simple case, so I think you are likely
to run into other issues there.
Even if you do manage to get libc++ working, then clang will still require
Microsoft's CRT, because clang does not provide one of those. So just
changing the c++ library doesn't mean you will be able to remove the
Microsoft dependency entirely.
On Fri, Dec 14, 2018 at 12:37 PM Osman Zakir via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Okay, but normally you'd want to use the C++ standard library of the
> compiler you're using, right? Does LLVM not work that way? To me, it
> makes more sense to use the Windows native C++ standard library with the
> MSVC compiler, libc++ with Clang, GCC's with GCC (what's it called again?
> I don't remember).
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev