Results 1 to 6 of 6

Thread: Cannot build/compile C++ code

  1. #1

    Default Cannot build/compile C++ code

    Hi all,

    I have just downloaded and installed QT Creator 2.4.0 .
    Wanted to load and compile a school assignment written in C++, but everytime I try this error pops up:

    Error while building project test (target: Desktop)
    When executing build step 'qmake'
    I've got MinGW installed on my computer, but I'm not sure whether Qt is able to detect it.
    Been searching and searching all over the internet trying to fix this problem but I just can't get it right...

    Is there someone who knows how to fix this problem?

    Kind regards,

    Bucket

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Cannot build/compile C++ code

    qmake is part of a Qt libraries install not MingW or Qt Creator. It looks much more like you don't have a set of Qt libraries built/installed and Qt Creator configured to find them.

    You could also download the Qt SDK, which has libraries, a minimal MingW install, and Qt Creator in one neat bundle.

  3. #3

    Default Re: Cannot build/compile C++ code

    Tried installing Qt SDK first actually, but it had the same problem compiling stuff.
    I've also got MingW installed and I'm using it for Eclipse, so it's added to the environment already.

    I'll try reinstalling it but I'm quite sure it won't solve the problem. Got any other suggestions?

  4. #4

    Default Re: Cannot build/compile C++ code

    Reinstalled Qt SDK with MingW included, but still no luck...
    I'm getting the exact same message as in the first post.

    Is there anything else that could be wrong? I'm trying to compile the package attached to this post. Could it be the package is faulty?

    Gebouw.zip

  5. #5
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Cannot build/compile C++ code

    It compiles ok - I downloaded your project, opened Qt creator, selected "Open file (ctrl+O)", navigated to your project dir and opened "gebouw.pro". Next thing was to go to project settings (Ctrl+4) and set "Qt version" to "Qt in PATH". Build was successful after doing this.
    Without setting the Qt version in project settings I got the same error, I don't know why and I don't really care

  6. #6

    Default Re: Cannot build/compile C++ code

    Ye, this seems to solve the problem
    Thanks a lot for the help!

Similar Threads

  1. How to code an App that will build QT projects
    By locke in forum Qt Programming
    Replies: 12
    Last Post: 24th August 2010, 12:48
  2. Replies: 2
    Last Post: 9th November 2009, 09:31
  3. compile source code file
    By eva in forum Qt Programming
    Replies: 6
    Last Post: 16th March 2009, 11:15
  4. build/compile QT4.4 with VisStudio2008
    By mgdqt in forum Installation and Deployment
    Replies: 2
    Last Post: 30th May 2008, 16:52
  5. build code using vs 2005
    By arunredi in forum Installation and Deployment
    Replies: 3
    Last Post: 14th May 2008, 18:42

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.