Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.6, 5.4.0
-
None
-
Windows 7 SP1, Visual Studio 2010 SP1, Qt 4.8.6
-
d83bd9c6f5abd936b853029bf7030ebb4792f9fb
Description
When defining a variable for the pre-pocessor via qmakes:
DEFINES += FOO=BAR BAR
the vcxproj generator for Visual Studio 2010 fails to generate a valid project file:
the RC compiler fails.
I tried different syntaxes to have the project file for VS2010 valid, but everything I tried failed:
# DEFINES += FOO=BAR BAR ### (1) compiles but delivers 1 in main.cpp instead of "BAR BAR" # DEFINES += FOO="BAR BAR" ### (2) moc does not work, CC1x Fails with undefined BAR # DEFINES += FOO='BAR BAR' ### (3) moc does not work, CC1x Fails with undefined BAR # DEFINES += 'FOO="BAR BAR"' ### (4) RC fails # DEFINES += "FOO=BAR BAR" ### (5) moc does not work, CC1x Fails with undefined FOO DEFINES += "FOO=\"BAR BAR\"" ### (6) RC fails ( FOO seems to be replaced as "BAR BAR" in main.cpp, at least intellisense says so...)
It seems to sum up, that RC and CC need different syntax in the <PreprocessorDefinitions> under <ClCompile> and <ResourceCompile>
If you take aternative (6) with "just" RC failing and change inside the
<ResourceCompile> <PreprocessorDefinitions> FOO="BAR BAR"
to
"FOO=BAR BAR"
then RC compiles !!!
However I did not check, if using FOO inside the RC file works in this case....
I attached the pro file which was modified from a normal widget app wizard generated project.