[cfe-dev] Clang 3.1: Can't link Hello World-program program on Linux

bruce.r.stephens at gmail.com bruce.r.stephens at gmail.com
Sat Mar 3 08:11:47 PST 2012


David Chisnall <csdavec-NvTk+tks62u1Qrn1Bg8BZw at public.gmane.org> writes:

[...]

> In FreeBSD trunk, we have libc++.so dynamically linked against
> libcxxrt.so (so that eventually we can link libstdc++.so against it
> and - with some care - mix libraries linked against both.  It hasn't
> been extensively tested, but compiling things with -stdlib=libc++
> seems to work without needing any extra flags.

That ought also to work, depending on the linker. (ISTR having issues
with doing this kind of thing with gold, for example.) But anyway, just
building with -fPIC seems to work fine.

Ah, except for std::uncaught_exception, come to think of it: I found
that given as duplicately defined (in libcxxrt and libc++). Removing the
libcxxrt definition resolved that.



More information about the cfe-dev mailing list