tags:

views:

45

answers:

2

How do I add a define with qmake WITH a value:

For example, this does not work (as I expected) in my .pro file:

DEFINES += WINVER 0x0500

nor

DEFINES += "WINVER 0x0500"

How do I define WINVER as 0x0500 before anything starts compiling so it's definition is not affected in any way by compilation or include order?

A: 

"DEFINE WINVER 0x0500"

rhinoinrepose
e.g. `DEFINES += "DEFINE WINVER 0x0500"` in the .pro file?
Jake Petroules
+3  A: 

DEFINES += "WINVER=0x0500" works for me.

This way, -DWINVER=0x0500 is added to the command line of the compiler, which is the syntax GCC/mingw expects for command line preprocessor definitions (see here for the details).

Greg S
+1 This works perfectly, thanks! It added `-DWINVER=0x0500` to the Makefile just as you said. PS - I didn't need the quotes since there's no spaces. ;)
Jake Petroules
@Jake: You're very welcome!
Greg S