Qt Unit Test Project will not compile



  • Hello.

    I have created a Qt Unit Test Project with the wizard in QtCreator 2.2 (Qt 4.7.3 / Windows - MinGW 4.4). But when I try to compile it I get this message:

    [debug/tst_QtestTest.moc] Error 1
    file not found

    I haven't modified it. It will not compile as it was created by the wizard.

    Thanks in advance.


  • Moderators

    A unmodified new Qt Unit test project set up by Qt Creator from master works for me. Maybe it was a issue with Qt Creator 2.2 that was fixed since back then?

    Could you please try the 2.4RC and "file a bug report":http://bugreports.qt.nokia.com/ if the issue is in that version, too? Thanks!



  • This behaviour does not depend on a specific Qt Creator version. All say '[debug/tst_QtestTest.moc] Error 1 file not found' under Issues and 'moc: Too many input files specified' under Compile output.

    I think I figured out what the problem is. The path where the project is located must not have any spaces. If I create a project in e.g. c:\QtProjects\Test it work.

    Strangely enough, if I create an ordinary Qt-Widget-Project with a path with spaces it compiles without any problems.

    @Tobias Hunger: Is this behaviour reproduceable on your machine? Is this an bug and shall I make a bugport of this?



  • Was this problem resolved because I have the same thing with QtCreator 2.4.1 and Qt 4.8.2. I created a brand new unit test in my root directory under 'My Documents' in XP. The main project has been working fine there but it appears that the unit tests dont like directories with spaces. When I moved the entire project directory down to C: it works fine.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.