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

Boris Kolpackov boris at codesynthesis.com
Tue Sep 3 07:36:59 EDT 2013


Hi Philipp,

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

> Ok, I built all the libs with the flags you mentioned.

You mean you built libodb and libodb-sqlite as static libraries, right?


> Still I have linker errors about absent symbols

All the missing symbols have std::string in their signatures, so it
has to do with a different standard library "seen" when building
libodb-sqlite and your application.

Also, I assume you made sure that Clang actually works with these
options (--std=c++11 --stdlib=libc++) e.g., by building other
programs or a test?


> Maybe the cmake file helps to find any clue.

Try to build a test executable manually, from the command line. For
instance, try to build the 'hello' example from the odb-examples
package like this:

odb -d sqlite -q --std=c++11 person.hxx
clang++ --std=c++11 --stdlib=libc++ -c person-odb.cxx
clang++ --std=c++11 --stdlib=libc++ -DDATABASE_MYSQL -c driver.cxx
clang++ --std=c++11 --stdlib=libc++ -o driver driver.o person-odb.o -lodb-sqlite -lodb

Boris



More information about the odb-users mailing list