[odb-users] Problem generating and compiling with pragma-only file

Boris Kolpackov boris at codesynthesis.com
Tue Dec 30 09:04:16 EST 2014


Hi Christian,

Christian Sell <christian at gsvitec.com> writes:

> that is what one gets by directly passing the pragma-only file to the odb
> compiler, rather than directly passing in the file with the classdefs and
> passing the pragma file via -odb-epilogue-file (as described in the docs)

Note that ODB has a mechanism for changing the place (as in the header)
where it "thinks" a class is defined so it should be possible to compile
the "mapping" file and get a sensible result if you that's what you want.
This is described in more detail in the "Custom C++ to Database Type
Mapping" blog post, the "Composite Value Types" section (the post uses
it to handle a composite value type but it works equally well for objects):

http://www.codesynthesis.com/~boris/blog/2012/10/16/custom-cxx-to-database-type-mapping-in-odb/

Boris



More information about the odb-users mailing list