QTCreator refuses to compile although everything looks fine



  • Hi everybody,

    At first I installed the precompiled qt5 binaries, but since I didn't want to use the vs-compiler I built qt5 with mingw myself (thanks to http://qt-project.org/wiki/Building_Qt_5_from_Git ) and everything looks fine.
    "screenshot1":http://img802.imageshack.us/img802/7927/qt1.png
    I can add the binaries I compiled to a new kit and add mingw as compiler. No error is shown in the options tab.
    "screenshot2":http://img831.imageshack.us/img831/6227/qt2.png
    But when I try to compile a project I get an error:

    :-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

    What am I doing wrong?

    Best Regards and thanks in advance,
    mpror


  • Moderators

    Click on the "Projects" button on the left (below "Debug", above "Analyze")

    Under "Build & Run", click "Add Kit" and add your "QT5 mingw" kit

    Click on the "Test \ Release" button on the lower left (above the green arrow), and make sure you're using the "QT5 mingw" kit

    Try compiling again

    Does that work?

    (P.S. It's "Qt", not "QT" -- "QT" stands for QuickTime :) )



  • Thank you, this works now :)

    My new problem is, that the Makefile is now created using \ where a / is needed

    e.g.:
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\mainwindow.o ..\test\mainwindow.cpp

    works when I change it to

    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/mainwindow.o ../test/mainwindow.cpp

    still looking for where I can change this setting (or whatever it is)

    mpror


  • Moderators

    Why is the back slash '' a problem in the makefile?
    The back slash is used traditionally on windows, while linux is using the forward slash. Noadays you may use the back and the forward slash on windows. For qmake you have to use the forward slash, since the backward slash has a special meaning (line continuation). Since qmake is generating the makefile it is ok. For changing to a linux system it is most likely required to regenerate the makefiles anyhow. There they should have the forward slashes.


Log in to reply
 

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