[odb-users] clang and libc++
boris at codesynthesis.com
Thu Apr 26 10:51:22 EDT 2012
Daniel James <danielpeterjames at gmail.com> writes:
> I'm running into a problem when using the binary MacOS ODB compiler
> and libodb*.dylib compiled with clang++ and linked to libc++.
> Is this supported?
We haven't tried this configuration ourselves yet, but it should work,
provided libc++ is complete enough.
> Here's an example of the link error I'm getting:
> std::__1::char_traits<char>, std::__1::allocator<char> >,
> unsigned long&, bool&, std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
> referenced from:
> person const&, odb::sqlite::statement_kind) in person-odb.o
This looks like you are not linking to libodb-sqlite-*.dylib. You need
to build and link to this library if you are using SQLite.
> Is it that the templates are not being instantiated for
> std::__1::basic_string by the ODB plugin?
> If this is the case can I compile/configure the ODB plugin in such a
> way that it will know about libc++ classes?
ODB plugin doesn't really instantiate anything nor does it care about
which standard C++ library implementation you use to build your
application. It is standard C++ in, standard C++ out. You should then
be able to compile the output C++ code with any reasonably conforming
Let us know how it goes.
More information about the odb-users