How can I add a string define to the preprocessor using qmake? I'm looking for a way to do the following, but it does not work.
DEFINES += MY_DEFINE="FOO BAR"
Please help me.
How can I add a string define to the preprocessor using qmake? I'm looking for a way to do the following, but it does not work.
DEFINES += MY_DEFINE="FOO BAR"
Please help me.
Try this:
qmake Code:
DEFINES += "MY_DEFINE=\"FOO BAR\""To copy to clipboard, switch view to plain text mode
No, that does not work. In this case Moc fails.
Fails on what? What is the exact error? Try this too:
qmake Code:
DEFINES += "MY_DEFINE=FOO_BAR" # no space between FOO and BAR allowedTo copy to clipboard, switch view to plain text mode
It works fine for me, by the way...
Hi there,
What about if you want to define the FILEVERSION (without the quotes) For the resource file(windows),
something like this:
DEFINES+= PROD_VER=5,6,4,5
how this could be done?
Last edited by cafu1007; 29th March 2011 at 16:53.
Qt Code:
defines += 'my_define=\'\"foo bar\"\''To copy to clipboard, switch view to plain text mode
I solved it like this
DEFINES += MY_DEFINE=\\\"FOO BAR\\\"
Bookmarks