Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1, 5.7.1, 5.8.0, 5.9.1
-
None
-
Windows 7 (any windows?)
Tested with MSVC2015 x64 (but I think that it is independent from compiler type or version)
-
342609b542a4c9c50f40b5843e0622ca3f401da0
Description
When the following conditions are both met:
- Project path contains white-spaces (for example C:\User Data\workspace\MyProject)
- Include directives are more than 40
Build fails when invoking moc.exe with the following error:
moc: Cannot open options file specified with @ NMAKE : fatal error U1077: 'C:\Qt\5.9.1\msvc2015_64\bin\moc.exe' : return code '0x1'
This is due to qmake generating an invalid command for any moc cpp that has to be generated, for example:
C:\Qt\5.9.1\msvc2015_64\bin\moc.exe $(DEFINES) --compiler-flavor=msvc --include "C:\User Data\workspace\MyProject\moc_predefs.h" @C:\User Data\workspace\MyProject\mocinclude.opt MyQObject.h -o moc_MyQObject.cpp
In this extract from my Makefile, the mocinclude.opt file (which is generated by qmake) is passed to moc.exe without quotes, generating the error above.