Qt World Summit: Submit your Presentation

Project ERROR: Cannot run compiler 'g++' (Windows)

  • Hello,

    I coded this morning with QtCreator (Qt 5.12.4, Windows 10, MinGW 7.3 32 bits), all was okay. I restart QtCreator few hours ago and open again my project, which follow with this error message :

    Error while parsing file C:\MG\LPP\Programmation\LPP_Maquette\LPP_Maquette.pro. Giving up.
    Le chemin d'accŠs sp‚cifi‚ est introuvable.
    Project ERROR: Cannot run compiler 'g++'. Output:
    # 1 "C:/Qt/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp"
    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1 "C:/Qt/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp"
    # 26 "C:/Qt/5.12.4/mingw73_32/mkspecs/features/data/macros.cpp"
    Maybe you forgot to setup the environment?

    This message appears even when I create a new project. The only file which is displayed on QtCreator is the .pro file.

    I looked up my settings of QtCreator but all seems okay :


    For information, I already add the path of Mingw in the environment variables but no sucess :

    Do you know where it can come from ? I have not a lot of experience in QtCreator, Cmake, etc so I have a little lost.
    Thank you in advance for your help.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You have several different versions of MinGW installed. You should remove the one that you did not install with Qt from the PATH environment variable.

  • I delete the C:\MinGW\bin path from the "PATH" environment variables. But I have still same errors :


    Do you have others clues ? ^^

  • @mgauquelin
    I still see at least C:\Qt\Tools\mingw730_32\... & C:\Qt\5.12.4\mingw73_32\... on your PATH. In fact, you now have more elements there than before. We don't know how these might interfere. You only need one of these, don't you (or do you really need all 4, I don't know)? Does one of those directories indeed contain the g++ executable?

  • I try with only one and after I added the 3 others to test. But indeed I get back to only one (Tools\mingw\bin) which contains g++.exe yes.