Hi everyone,i've recently installed the latest Qt5.0.1. Im porting my application to use it, i 've encounter a weird problem while trying to compile my unittests.
I've created simple unittest proyect, and without modifying anything, i just try to build it and it fails. It always complains about "moc: Too many input files specified"
Here's the compile line, the one generated automatically by Qt Creator (QMake):
C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/Seba Notebook/Documents/Fuentes/workspace/Unittest'
C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\moc.exe -DUNICODE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR=\"C:/Users/Seba Notebook/Documents/Fuentes/workspace/Unittest\" -I. -I"..\..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\in clude" -I"..\..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\in clude\QtTest" -I"..\..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\in clude\QtCore" -I"debug" -I"..\..\..\..\..\..\Qt\Qt5.0.1\5.0.1\mingw47_32\mk specs\win32-g++" -D__GNUC__ -DWIN32 tst_unittesttest.cpp -o debug\tst_unittesttest.moc
What is wrong with it? the weird thing is that the same proyect with the same Qt5.0.1 builds on another machine. My guess is that Qmake is the problem, and is generating something wrong in the include lines, thus moc.exe failing later.
Any ideas? help will be much appreciated.
Thanks!
Added after 31 minutes:
Ok i think i found the issue. the problem is here: -DQT_TESTCASE_BUILDDIR=\"C:/Users/Seba Notebook/Documents/Fuentes/workspace/Unittest\"
If i replace it for -DQT_TESTCASE_BUILDDIR="." or removing the backslashes that escapes the double quotes, works. Not sure why qmake is adding thoes backslashes since that breaks the compilation. I guess this is a bug.
Any one had this issue before? it only hapens with unittests, so adding testlib on the .pro, causes qmake to add this flags and so generating a corrupted Makefile.
Thanks!
Bookmarks