Important: Please read the Qt Code of Conduct -

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 ) and everything looks fine.
    I can add the binaries I compiled to a new kit and add mingw as compiler. No error is shown in the options tab.
    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,

  • 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

    $(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)


  • 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