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

Alexander Korsunsky fat.lobyte9 at gmail.com
Fri Mar 2 00:30:18 PST 2012


On 2012-03-01 12:03, David Chisnall wrote:

> libc++ does not provide the ABI layer, just the STL layer.
Ok, I did not know that.

> You need another library for the ABI.  You may be able to link to
libstdc++ and get libsupc++ indirectly.
That doesn't work, I get the same linking error. Apparently the linker
is trying to include libstdc++, but fails with
"could not read symbols: Invalid operation"


> Alternatively, try using libcxxrt:
> 
> https://github.com/pathscale/libcxxrt/
Thanks, linking with libcxxrt works! Now I can try the compiler. However
it works only dynamically, and I have to pass
"-ldl -lcxxrt --stdlib=libc++" to every compile.

I know integration with GCC's headers and libraries must be difficult,
but shouldn't it be easier to obtain a working version of Clang?

Alexander



More information about the cfe-dev mailing list