[odb-users] Using ODB with qmake on Windows

Boris Kolpackov boris at codesynthesis.com
Thu Oct 25 05:07:30 EDT 2012


Hi Jordan,

Jordan J. Neuhart <jneuhart at tlirr.com> writes:

> I'm new to odb and I would like to use it on a Qt project that I am
> working on.  I'd like to be able to run the odb compiler as a
> pre-compilation step in qmake, but I can't seem to get it to work. Does
> anyone have any experience with this and would be willing to share their
> solution?

Are you using qmake as part of the QtCreator? What is your target 
toolchain (i.e., VC++ or MinGW)?

There is a page on the Wiki that describes how to setup ODB with
QtCreator on Linux:

http://wiki.codesynthesis.com/Using_ODB_with_Qt_Creator_on_Linux

It includes a section of qmake .pro file that contains the rules for
compiling headers with ODB. I think it should work on Windows with
possibly two modifications:

1. The 'odb.commands = ...' line assumes that the ODB compiler
   executable is in the PATH. If that's not the case, then you will
   need to change it to something like this:

   odb.commands = C:\odb-X.Y.Z\bin\odb.exe ...

2. The 'odbh.commands = @true' line needs to be changed to something
   equivalent for the Windows cmd shell:

   odbh.commands = rem

Can you try this and let us know if it works?

Boris



More information about the odb-users mailing list