Results 1 to 1 of 1

Thread: Qt5 Unittest build fails

  1. #1
    Join Date
    Jul 2011
    Posts
    42
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt5 Unittest build fails

    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!
    Last edited by superpacko; 25th February 2013 at 19:12.

Similar Threads

  1. QWT fails in debug build
    By steg90 in forum Qwt
    Replies: 1
    Last Post: 11th November 2011, 07:53
  2. Build Qwt with msvc2010 fails
    By Zeyneb in forum Qwt
    Replies: 2
    Last Post: 11th November 2011, 07:50
  3. QT 4.6.2 fails to build solaris 9
    By doggrant in forum Installation and Deployment
    Replies: 3
    Last Post: 16th March 2010, 10:54
  4. QT 4.5.1 (and.2) fails to build on Solaris 9
    By doggrant in forum Installation and Deployment
    Replies: 0
    Last Post: 22nd February 2010, 11:05
  5. Qt 4.1.2 Fails to build on Linux
    By rohandhruva in forum Installation and Deployment
    Replies: 6
    Last Post: 16th April 2006, 22:44

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.