[odb-users] Compilation time issue: undefined reference to `odb::access::object_traits

Boris Kolpackov boris at codesynthesis.com
Tue Oct 4 16:23:07 EDT 2011


Hi Charles,

Charles Jabbour Gédéon <charles.jabbourgedeon at gmail.com> writes:

> So, i got an error when i try to compile my project:
> 
>  undefined reference to
> `odb::access::object_traits<MyCoque>::persist(odb::database&
>
> [...] 
>
> I create the odb specific file by running this command:
> 
> odb -d mysql --generate-query --generate-schema coque.hxx

The above command will create coque-odb.hxx, coque-odb.ixx, and
coque-odb.cxx. You need to compile coque-odb.cxx and link the
resulting object file into your application.

Boris



More information about the odb-users mailing list