Details
Description
When the includepath contains spaces, the moc command line will be created incorrectly. This issue did not happen with version 1.1.6.
When following these steps:
1) In visual studio (2008), right click on the source folder in the
solution explorer, and select add->Class.
2) In the Add class Window, select Qt4class, or Qt4GuiClass, it doesn't
matter.
3) In the Qt4Class window, specify an object with any name, where the
Insert Q_OBJECT checkbox is checked.
4) After finishing the add, try to compile the project. The following error message occurs when the includepath contains a space:
1>------ Build started:
1>Moc'ing someFile.h...
1>moc: Too many input files specified
1>Usage: moc [options] <header-file>
1> -o<file> write output to file rather than stdout
1> -I<dir> add dir to the include path for header files
1> -E preprocess only; do not generate meta object code
1> -D<macro>[=<def>] define macro, with optional definition
1> -U<macro> undefine macro
1> -i do not generate an #include statement
1> -p<path> path prefix for included file
1> -f[<file>] force #include, optional file name
1> -nw do not display warnings
1> @<file> read additional options from file
1> -v display version of moc
1>Project : error PRJ0019: A tool returned an error code from "Moc'ing someFile.h..."
The command line looks as follows:
"$(QTDIR)\bin\moc.exe" "$(InputPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp" "-I$(QTDIR)\include" "-I$(QTDIR)\include\ActiveQt" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtSql" "-I$(QTDIR)\mkspecs\win32-msvc2008" "-I.\src" "-I.\src\T3D" "-I.\src\T3D\lib" "-I.\src\T3D\lib\collada\include" "-I.\src\T3D\lib\collada\include\1.4" "-I.\src\T3D\lib\d3dx8dll" "-I.\src\T3D\lib\directx8" "-I.\src\T3D\lib\fmod" "-I.\src\T3D\lib\fmod\inc" "-I.\src\T3D\lib\libogg\include" "-I.\src\T3D\lib\libtheora\include" "-I.\src\T3D\lib\libvorbis\include" "-I.\src\T3D\lib\ljpeg" "-I.\src\T3D\lib\lmng" "-I.\src\T3D\lib\lpng" "-I.\src\T3D\lib\lungif" "-I.\src\T3D\lib\opcode" "-I.\src\T3D\lib\openal\win32" "-I.\src\T3D\lib\squish" "-I.\src\T3D\lib\tinyxml" "-I.\src\T3D\lib\zlib" "-I.\src\User "-IC:\Program "-IC:\Qt\kd_chart\include" (March (x86)\Microsoft 2009)\Include" -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -DBAN_OPCODE_AUTOLINK -DDEBUG -DDOM_INCLUDE_TINYXML -DICE_NO_DLL -DINITGUID DirectX -DNOWINBASEINTERLOCK -DPCRE_STATIC -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_SQL_LIB -DQT_THREAD_SUPPORT -DTORQUE_COLLADA -DTORQUE_ENABLE_ASSERTS -DTORQUE_OGGTHEORA -DTORQUE_OGGVORBIS -DTORQUE_OPCODE -DTORQUE_SHADERGEN -DTORQUE_SHARED -DTORQUE_TOOLS -DTORQUE_UNICODE -DTORQUE3D -DUNICODE -DWINVER_E Files Files\Microsoft Interface" SDK
When looking at the moc command line for another object in the project, created with an earlier version of the VS add-in, it looks like this:
"$(QTDIR)\bin\moc.exe" "$(InputPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"