[odb-users] clang and libc++
Boris Kolpackov
boris at codesynthesis.com
Thu Apr 26 10:51:22 EDT 2012
Hi Daniel,
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:
>
> "odb::sqlite::default_value_traits<std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> >,
> (odb::sqlite::database_type_id)2>::set_image(odb::details::basic_buffer<char>&,
> unsigned long&, bool&, std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&)",
> referenced from:
> odb::access::object_traits<person>::init(odb::access::object_traits<person>::image_type&,
> 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
compiler.
Let us know how it goes.
Boris
More information about the odb-users
mailing list