[odb-users] C++11 with clang on OSX 10.8

Boris Kolpackov boris at codesynthesis.com
Tue Aug 27 13:53:01 EDT 2013

Hi Philipp,

Philipp Maluta <fil.the.ensoreus at gmail.com> writes:

> Still no luck.
> Building libodb with c++11
> ./configure CXX=clang++ CC=clang CXXFLAGS="--std=c++11 --stdlib=libc++" --prefix=/opt/local --disable-threads
> make 
> Undefined symbols for architecture x86_64 [...]

Are you seeing these errors while building libodb or your executable?

The undefined symbols that you see are all from the standard C++
library. The two possibilities that I see are: (1) the build
system does not pass the --stdlib=libc++ to the compiler/linker
as it should (specifically, libtool is known for doing things
like this) or (2) there is some problem with your clang++/c++11/libc++

If you are seeing this when building libodb, then you may want to
change the configure command line like this in order to try to
address the first possibility:

./configure CXX="clang++ --std=c++11 --stdlib=libc++" --prefix=/opt/local --disable-threads

> So, is there a some article of how to use odb with c++11?

The things that you are doing (enable C++11 in the C++ compiler)
are all that you should need. In fact, I don't think it is C++11-
related. Rather, there seems to be some problem with the standard


More information about the odb-users mailing list