[odb-users] Problem linking my project: undefined reference to `odb::access::object_traits_impl

Boris Kolpackov boris at codesynthesis.com
Thu May 14 16:33:09 EDT 2015


Hi Faissal,

Faissal Elamraoui <amr.faissal at gmail.com> writes:

> /usr/local/include/odb/database.txx:38: undefined reference to
> `odb::access::object_traits_impl<BGOParams,
> (odb::database_id)0>::persist(odb::database&, BGOParams&)'
> collect2: error: ld returned 1 exit status
> 
> odb and odb-mysql libraries are already passed to the Linker

This symbol is defined by one of the -odb.cxx files. Specifically,
if the header file that defines BGOParams were called foo.hxx, then
the file that you need to add to your project would be foo-odb.cxx.

Boris



More information about the odb-users mailing list