[odb-users] Problems using --output-dir option
Boris Kolpackov
boris at codesynthesis.com
Thu May 19 12:06:41 EDT 2011
Hi Uwe,
cetoni GmbH - Uwe Kindler <uwe.kindler at cetoni.de> writes:
> But the ODB compiler generates the following includes in WellPlate-odb.h:
>
> #include "WellPlate.h"
> #include <qtlabb/items/Cavity-odb.h>
The ODB compiler comes up with the <qtlabb/items/Cavity-odb.h> path
based on the Cavity.h include in WellPlate.h (which I assume is
<qtlabb/items/Cavity.h>). I don't think ODB can figure out on its
own that the include should instead be <qtlabb/items/odb/Cavity-odb.h>.
This will be just too smart to be robust. What we have in our other
product (XSD) to allow such include structures is the --include-regex
option which allows you to transform all the include directives as
you see fit. I think something like this will work well in your case.
> With the --include-prefix option I can change the wrong path to
> "WellPlate.h" if I use the prefix.
You can also use the --include-with-brackets option to change the
quote-include ("") to bracket-include (<>). The --guard-prefix option
can also be useful.
> The only way I get it working is if I do not use --output-dir option and
> to let ODB store the generated files in the same directory like my
> source files.
Yes, this seems to be the only solution at the moment. We can try to
implement the --include-regex option for the next release if you think
it will work for you.
Boris
More information about the odb-users
mailing list