Comment #5 on issue 449 by ltwar...@gmail.com: Link error while using clang++ with -stdlib=libc++ flag in OSX
http://code.google.com/p/protobuf/issues/detail?id=449

Im doing this in Linux.
My configure:
./configure --prefix=/usr CC=clang CXX=clang++ CXXFLAGS="-O2 -stdlib=libc++" LIBS="-lc++ -lc++abi"

After compilation and installation:

ldd /usr/lib/libprotobuf.so

linux-vdso.so.1 (0x00007fffe4505000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fe3199ea000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fe3197d4000)
libc++abi.so.1 => /usr/lib/libc++abi.so.1 (0x00007fe319785000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x00007fe3195f6000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fe3192f8000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fe318f4b000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fe318d35000)
/usr/lib/ld-linux-x86-64.so.2 (0x00007fe319d63000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007fe318b2d000)

There is not libstdc++

Note: libc++ does not come with the ABI layer, that is why i'm linking also libc++abi. This may be the cause that in Your case libstdc++ is still pulled as a fallback to unresolved symbols, i think that this is the way that FreeBSD guys did it or maybe You linker has some defaults.

Ps. The "string" case is the way to version libraries, in this case C++11 inline namespace feature is used.



--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to