Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Unit Test Project will not compile
Qt 6.11 is out! See what's new in the release blog

Qt Unit Test Project will not compile

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rubikon
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      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!

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rubikon
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          simonmeaden
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved