[odb-users] using the odb command when one of the c files is generated by makefile

Boris Kolpackov boris at codesynthesis.com
Fri Jul 3 14:13:29 EDT 2015


Hi Teererai,

Teererai Marange <selection989 at gmail.com> writes:

> When running the program in the absence of database persistance I simply use
> the -include $< directive with g++ to make it as if there is a #include
> directive at the start of my class file, thus making it compile as intended
> while, not limiting the file to a specific name. My question is whether it
> is possible to do the same when I use the odb command.
>
> As an example my odb command would look like this:
> 
> odb -d mysql --generate-query --generate-schema person.hxx -include leg.hxx

ODB has the -x option which instructs it to pass the next argument to
g++, verbatim. So it seems to me this should do the trick:

odb ... -x -include -x leg.hxx ...

Boris



More information about the odb-users mailing list