[odb-users] Missing include file
Stath, Paul
PStath at Axxcelera.com
Tue Jul 30 17:05:14 EDT 2013
I am attempting to use the "--schema-format separate" option to generate the database DDL into a different translation unit.
The generated <name>-schema.cpp file cannot be compiled into an object file because the generated code references the odb::database class, but does not #include <odb/database.hxx>.
If the schema contains database objects with lazy pointers, the <odb/database.hxx> gets included by <odb/lazy-ptr-impl.txx>.
If the schema is very simple, adding the #include <odb/database.hxx> line allows the <name>-schema.cpp to compile successfully.
I am able to work around the issue by adding the "--hxx-prologue '#include <odb/database.hxx>'" argument when generating the schema files.
--
Paul Stath
Axxcelera Broadband Wireless
More information about the odb-users
mailing list