[odb-users] Unresolved external symbol error when including *.hxx file with common declarations

Boris Kolpackov boris at codesynthesis.com
Tue Feb 16 22:45:50 EST 2016


Hi,

An Hu <anhu.com at gmail.com> writes:

> The reason for this: I want to use structures declared in common.hxx also
> in other files [...]
> 
>  error LNK2019: unresolved external symbol "public: static void __cdecl
> odb::access::composite_value_traits::bind(struct odb::mssql::bind *,struct
> odb::access::composite_value_traits::image_type &,enum
> odb::mssql::statement_kind)"

You need to compile common.hxx with the ODB compiler and then add the
resulting common-odb.cxx file to your project.

Boris



More information about the odb-users mailing list