Qt World Summit: Register Today!

New install, error with "qmake".

  • Downloaded the open source version, installed, opened it and clicked on Build and got this error message:
    Error while building/deploying project qtrial (kit: Desktop Qt 5.8.0 GCC 64bit)
    When executing step "qmake"

    I suspect I may have missed a step, or even a whole chapter, but what?
    Running Linux Mint Serena.

  • @bogwon I just got done seeing this as well. The thing is after I got through the qmake error(http://howtofix.pro/qt-solve-error-when-executing-step-qmake/) , I had another error(c1902 program database mismatch). Then I realized microsoft(had mvcs compiler)+ open source = problems. So I am reinstalling and going to use mingw.

    EDIT: My reinstall works, so I have an open source install with mingw, qmake and build worked right off the bat.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Might be a silly question but did you install the developer tools on your machine ? If so, can you share the complete error message ?

    @ZekeJax Qt doesn't have any problem with Visual Studio, you need to download and install a matching version.

  • Moderators

    @bogwon said in New install, error with "qmake".:

    When executing step "qmake"
    I suspect I may have missed a step, or even a whole chapter, but what?

    Please, share a screenshot how the kit is configured (use an external site to upload the image). Also try running qmake from the command line and see if you get an error, if you do run qmake with debug info (qmake -d projectfile.pro) and post the output here. Additionally, make sure you execute the correct qmake binary (you may have one installed from your distro).

  • Which developer tools? I installed Eclipse on my machine and can compile and run programs using it. The Qt webpage claims
    "The easiest way to start application development with Qt is to download and install Qt 5. It contains Qt libraries, examples, documentation, and the necessary development tools, such as the Qt Creator integrated development environment (IDE)."

    The error message I posted is complete. That is all it says.

    A screenshot of how the kit is configured? I do not understand what you want. I did not 'configure' anything, I simply downloaded and installed Qt5.

    I used Synaptic Package Manager to install qmake5, but it didn't help. It got stored here
    invoking it in a terminal window gets you nothing (command not found)

    So then I installed qmake4. It didn't help either. It got stored here
    Inside the QT IDE I still get the same error message.
    But now I can invoke it from the command line.

    Synaptic Package Manager also offers something called
    qt5-qmake-gles Qt 5 qmake Makefile generator tool - OpenGLES
    Installing this forces the removal of qmake5. Made no difference.

  • Moderators

    @bogwon said in New install, error with "qmake".:

    Which developer tools?

    You need a compiler and makefile interpreter to build anything, literally anything on linux. You'd need for g++ , libstdc++-dev, libc-dev, make, autotools , gdb (that's the debugger). Mint is a debian derivative so I'm just extrapolating the packages' names, I hope I didn't miss anything.

    I did not 'configure' anything, I simply downloaded and installed Qt5.

    How? There's an online installer, there's an offline installer, there's repository packages, there's manual building from installed sources and there's manual building from git repository. You need to tell us what you did exactly.

    Inside the QT IDE I still get the same error message.

    Which refers to a faulty kit (see the second part). A kit is a combination of compiler, qmake (and thus Qt version) and (optionally) a debuger.

    But now I can invoke it from the command line.

    You can invoke what from the command line?

    Synaptic Package Manager also offers something called

    To make the default kit work you need Qt5's qmake in your PATH, thus you need to install qt5-default. At least that is if you installed Qt through Synaptic.

  • Something is not right. I can invoke qmake from the command line, which tells me the PATH variable is properly set, which makes me think that the QT IDE is not using PATH.

    Yes, I realize I need a compiler and makefile interpreter and all that other stuff. I have a full complement of tools that lets me build C programs. The QT package promises to include everything you need to build QT programs. So now I am wondering EXACTLY what development tools I need that were not included with the package. Or perhaps qmake is the only one and it was just on oversight on QT's part.

  • Lifetime Qt Champion

    just installed Serena
    after i did
    sudo apt-get install build-essential
    and also with qt5-default
    then it worked.
    qt5-default is very important.

  • Lifetime Qt Champion

    @bogwon QtCreator does not use qmake from PATH - instead it uses qmake defined in the Kit you're using. The reason for this is that you can have as many different Qt versions installed as you need. Please check your Kit in "Tools/Options.../Build & Run/Kits" - are there any errors/warnings?
    "The QT package promises to include everything you need to build QT programs" - this is not correct. It promises to include its own tools, but compiler are not part of it (except MinGW on Windows). Make sure g++ is installed.

  • @jsulm "Tools/Options.../Build & Run/Kits" looks fine. Screenshot: (http://imgur.com/PejHdgW)
    This forum's "insert image" widget does not seem to work with imgur.

  • Lifetime Qt Champion

    @bogwon There is no C++ compiler set, only C. You need C++ compiler. Check the Compilers tab.

  • Moderators

    From your screenshot it's apparent you have no c++ compiler.

  • Lifetime Qt Champion

    To add to my fellows who already noted it and since you are on Linux, you need to install g++ as well.

    Note that I find it surprising that it's not already the case since you seem to have your distribution installed Qt development environment.

  • OK, we're making progress. g++ was missing, installed it and the qmake error went away. Now when I try to build an example it complains about GL/gl.h missing.

    I have some OpenGL stuff installed, my old OpenGL program compiles and runs, so I am at a loss here as to what is needed.

    I could have sworn that in my last go-round with Linux the c++ compiler was installed by default, and may even have been the same as the C compiler.

  • Lifetime Qt Champion

    @bogwon C++ compiler is not the same as C compiler. GNU Compiler Collection (GCC) is a collection of different compilers, one of them is C++, it is called g++.
    Regarding the error: install mesa-common-dev and libgl1-mesa-dev packages

  • Lifetime Qt Champion

    Besides qt5-default
    this works every time

  • @jsulm That did it! Thanks.

  • Lifetime Qt Champion

    Great !

    Then please mark the thread as soled using the "Topic Tools" button so that other forum users may know a solution has been found :)

  • @jsulm C & c++ compilers are different animals now, but I am pretty sure that not too long ago there was one compiler that did both. Albeit, 'not too long ago' might mean ten or 20 years.

  • ""........Error while building/deploying project project_2 (kit: Desktop Qt 5.8.0 MSVC2015_64bit)
    When executing step "qmake".........""
    am using windows os..i am new to this help me

  • Lifetime Qt Champion

    Did you install the Qt visual 2015 packet ?

    Also, did you go download the actual visual studio compiler from microsoft site ?

    It must match. Qt version and Visual studio version

    So it wont work if u installed say vs 2013 or vs 2017

  • @mrjj
    i am trying to install that pacaket.but i think it has different extension ".vsix" so i don"t know how to do it..
    there is microsoft visual c++ 2015 showing in my pc"s control panel..

  • Lifetime Qt Champion


    Not sure what that is.
    Make sure you check on C++ in VS installer. Its not on pr default.
    Also no debugger pr default . must also be installed.
    the b4 bit version
    and make sure the Qt version macth your compiler.

    If all fails and you really just wanted to use Qt and not have to use Visual Studio
    then try
    It has compiler and debugger with :)

Log in to reply