[cfe-dev] Clang 3.1: Can't link Hello World-program program on Linux
David Chisnall
csdavec at swan.ac.uk
Tue Mar 13 16:52:38 PDT 2012
On 13 Mar 2012, at 23:47, Alexander Korsunsky wrote:
> 3) Please add a flag to link with the right library "-lc++abi" to the
> linker command line in the compiler driver, if "-stdlib=libc++" was
> specified. Maybe it is possible to check the dependencies of libc++
> (like ldd?), and add the correct library to the command line.
This would be the wrong thing to do in almost all situations. We are using libc++ with libcxxrt on Solaris and FreeBSD - adding -lc++abi would be just plain wrong (because we're not using libc++abi), and adding -lcxxrt is redundant because it is linked by libc++ so you don't need to link it twice.
Oh, and the missing unwind.h is not a problem if you are using libcxxrt either. It includes the required headers.
David
More information about the cfe-dev
mailing list