[odb-users] Problem generating and compiling with pragma-only file
Christian Sell
christian at gsvitec.com
Tue Dec 30 05:08:27 EST 2014
answering to myself:
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)
regards,
Chris
> Christian Sell <christian at gsvitec.com> hat am 29. Dezember 2014 um 21:17
> geschrieben:
>
>
> Hello,
>
> I have a problem with an application which has all ODB pragmas in a separate
> pragma-only header file. The pragma file is named "application_pragmas.h" and
> conceptually looks like this:
>
> #include "application.h"
> #pragma db object(Someclass)
> #pragma db member(Settings::num) id auto
>
> and the "application.h" header holds the class definitions (among other
> things):
>
> #include <odb/core.hxx>
>
> class Someclass {
> friend class odb::access;
>
> int num;
> }
>
> Now, the odb command generates 3 files as expected, namely:
>
> application_pragmas_odb.cpp
> application_pragmas_odb.h
> application_pragmas_odb_inline.h
>
> unfortunately, the generated file "application_pragmas_odb.h" contains the
> following include statement:
>
> #include "flexisapplication_odb.h"
>
> which references a file wich DID NOT get generated, although it obviously
> follows the naming pattern for odb-generated files. Moreover, if I remove the
> include statement, the compile goes through without problems.
>
> what is going wrong?
>
> thanks,
> Christian
>
More information about the odb-users
mailing list