Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Project ERROR: Cannot run compiler 'g++'. Output:
Forum Updated to NodeBB v4.3 + New Features

Project ERROR: Cannot run compiler 'g++'. Output:

Scheduled Pinned Locked Moved Unsolved General and Desktop
18 Posts 3 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joseph_ho
    wrote on last edited by joseph_ho
    #3

    Here are the Tools Options:

    0_1567057096893_kits1.png

    0_1567057103470_kits2.png

    0_1567057109829_kits3.png

    So far this problem happen only if I'm using the qmake build system. I didn't experience any problems if I'm using the Qbs build instead. Any ideas as to why?

    JKSHJ 1 Reply Last reply
    0
    • J joseph_ho

      Here are the Tools Options:

      0_1567057096893_kits1.png

      0_1567057103470_kits2.png

      0_1567057109829_kits3.png

      So far this problem happen only if I'm using the qmake build system. I didn't experience any problems if I'm using the Qbs build instead. Any ideas as to why?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #4

      @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

      So far this problem happen only if I'm using the qmake build system. I didn't experience any problems if I'm using the Qbs build instead. Any ideas as to why?

      Hmm... I can see that you have installed all your required tools. I'm not sure why you're having issues with the qmake build system.

      Open a project and click on the "Project" button on the left navigation menu (it is between "Debug" and "Help"). Look at the Build Environment under Build Settings, and see if you notice anything there.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      J 1 Reply Last reply
      0
      • JKSHJ JKSH

        @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

        So far this problem happen only if I'm using the qmake build system. I didn't experience any problems if I'm using the Qbs build instead. Any ideas as to why?

        Hmm... I can see that you have installed all your required tools. I'm not sure why you're having issues with the qmake build system.

        Open a project and click on the "Project" button on the left navigation menu (it is between "Debug" and "Help"). Look at the Build Environment under Build Settings, and see if you notice anything there.

        J Offline
        J Offline
        joseph_ho
        wrote on last edited by
        #5

        Hi @jksh, here is the screenshot of the Build Environment settings.

        0_1567469828289_build environment.png

        These are the values from the Path variable:

        C:\Qt\Tools\mingw730_32\bin;
        C:\Qt\5.12.4\mingw73_32\bin;
        C:\Qt\Tools\mingw730_32\bin;
        C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
        C:\WINDOWS\system32;
        C:\WINDOWS;
        C:\WINDOWS\System32\Wbem;
        C:\WINDOWS\System32\WindowsPowerShell\v1.0;
        C:\Program Files\Git\cmd;
        C:\Program Files\Microsoft SQL Server\110\Tools\Binn;
        C:\Program Files\PuTTY;
        C:\Program Files\TortoiseGit\bin;
        C:\WINDOWS\System32\OpenSSH;
        C:\Python27;
        C:\Program Files\TortoiseSVN\bin;
        C:\Program Files (x86)\Java\jre1.8.0_191\bin\client;
        C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;
        C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;
        C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;
        C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;
        C:\Program Files\Intel\WiFi\bin;
        C:\Program Files\Common Files\Intel\WirelessCommon;
        C:\Program Files\nodejs;
        C:\Program Files\Java\jre1.8.0_191\bin\server;
        C:\Program Files\Java\jdk1.7.0_80\bin;
        C:\Users\User\AppData\Roaming\npm

        The odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.

        JKSHJ 1 Reply Last reply
        0
        • J joseph_ho

          Hi @jksh, here is the screenshot of the Build Environment settings.

          0_1567469828289_build environment.png

          These are the values from the Path variable:

          C:\Qt\Tools\mingw730_32\bin;
          C:\Qt\5.12.4\mingw73_32\bin;
          C:\Qt\Tools\mingw730_32\bin;
          C:\Program Files (x86)\Common Files\Oracle\Java\javapath;
          C:\WINDOWS\system32;
          C:\WINDOWS;
          C:\WINDOWS\System32\Wbem;
          C:\WINDOWS\System32\WindowsPowerShell\v1.0;
          C:\Program Files\Git\cmd;
          C:\Program Files\Microsoft SQL Server\110\Tools\Binn;
          C:\Program Files\PuTTY;
          C:\Program Files\TortoiseGit\bin;
          C:\WINDOWS\System32\OpenSSH;
          C:\Python27;
          C:\Program Files\TortoiseSVN\bin;
          C:\Program Files (x86)\Java\jre1.8.0_191\bin\client;
          C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;
          C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;
          C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;
          C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;
          C:\Program Files\Intel\WiFi\bin;
          C:\Program Files\Common Files\Intel\WirelessCommon;
          C:\Program Files\nodejs;
          C:\Program Files\Java\jre1.8.0_191\bin\server;
          C:\Program Files\Java\jdk1.7.0_80\bin;
          C:\Users\User\AppData\Roaming\npm

          The odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #6

          @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

          The odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.

          I can't see what's causing the problem, sorry.

          1. Does it also happen if you use the MinGW 64-bit kit?
          2. Does it also happen if you use a different Windows account to run Qt Creator?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          J 1 Reply Last reply
          2
          • JKSHJ JKSH

            @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

            The odd thing was that when I've first installed and created the project, I could run it without any problems using qmake. A few hours later, this problem happened.

            I can't see what's causing the problem, sorry.

            1. Does it also happen if you use the MinGW 64-bit kit?
            2. Does it also happen if you use a different Windows account to run Qt Creator?
            J Offline
            J Offline
            joseph_ho
            wrote on last edited by
            #7

            @JKSH, apologies for the late reply.
            In regard to your 2 suggestions:

            1. How do I run/test the MinGW 64-bit kit without running the Qt Creator?

            2. I've downloaded & installed Qt Creator on another computer, and it worked without any problems there. This was done after the aforementioned problems started.

            jsulmJ 1 Reply Last reply
            0
            • J joseph_ho

              @JKSH, apologies for the late reply.
              In regard to your 2 suggestions:

              1. How do I run/test the MinGW 64-bit kit without running the Qt Creator?

              2. I've downloaded & installed Qt Creator on another computer, and it worked without any problems there. This was done after the aforementioned problems started.

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

              How do I run/test the MinGW 64-bit kit without running the Qt Creator?

              In a terminal. Call

              qmake.exe
              mingw32-make.exe
              

              You can open a terminal using the shortcut created during Qt installation (doing so you make sure the environment is set up properly).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              J 1 Reply Last reply
              2
              • jsulmJ jsulm

                @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

                How do I run/test the MinGW 64-bit kit without running the Qt Creator?

                In a terminal. Call

                qmake.exe
                mingw32-make.exe
                

                You can open a terminal using the shortcut created during Qt installation (doing so you make sure the environment is set up properly).

                J Offline
                J Offline
                joseph_ho
                wrote on last edited by
                #9

                @jsulm Do you mean like this?
                26e41a7a-33bb-40fc-812c-fd0dba27882b-image.png

                I've recently switched over to Qt Creator 4.8.2 (Enterprise) but still experiencing the same problems.
                I'm starting to suspect there might be caused by some corrupted leftover files or registries.

                jsulmJ 1 Reply Last reply
                0
                • J joseph_ho

                  @jsulm Do you mean like this?
                  26e41a7a-33bb-40fc-812c-fd0dba27882b-image.png

                  I've recently switched over to Qt Creator 4.8.2 (Enterprise) but still experiencing the same problems.
                  I'm starting to suspect there might be caused by some corrupted leftover files or registries.

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  @joseph_ho You need to do these calls in your PROJECT directory...

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  J 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @joseph_ho You need to do these calls in your PROJECT directory...

                    J Offline
                    J Offline
                    joseph_ho
                    wrote on last edited by
                    #11

                    @jsulm Is it like this?

                    de3e9efa-fd72-4fa3-8592-4c83556ba55b-image.png

                    jsulmJ 1 Reply Last reply
                    0
                    • J joseph_ho

                      @jsulm Is it like this?

                      de3e9efa-fd72-4fa3-8592-4c83556ba55b-image.png

                      jsulmJ Online
                      jsulmJ Online
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @joseph_ho Yes, but please use full paths to qmake and make.
                      Also, you should use the command prompt from MinGW (you will find it in Windows start menu). You then will have ready made environment where you can call wmake/make without using full path.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      J 1 Reply Last reply
                      2
                      • jsulmJ jsulm

                        @joseph_ho Yes, but please use full paths to qmake and make.
                        Also, you should use the command prompt from MinGW (you will find it in Windows start menu). You then will have ready made environment where you can call wmake/make without using full path.

                        J Offline
                        J Offline
                        joseph_ho
                        wrote on last edited by
                        #13

                        @jsulm It is this, right?

                        8d81df56-a75b-4b27-95ea-c09820097f84-image.png

                        jsulmJ 1 Reply Last reply
                        0
                        • J joseph_ho

                          @jsulm It is this, right?

                          8d81df56-a75b-4b27-95ea-c09820097f84-image.png

                          jsulmJ Online
                          jsulmJ Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #14

                          @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

                          It is this, right?

                          Apparently not!
                          Why do you call make/qmake inside the MinGW installation directory?! We actually already clarified that.
                          You need to call it inside your project/build directory (from where you called qmake).

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          J 1 Reply Last reply
                          2
                          • jsulmJ jsulm

                            @joseph_ho said in Project ERROR: Cannot run compiler 'g++'. Output::

                            It is this, right?

                            Apparently not!
                            Why do you call make/qmake inside the MinGW installation directory?! We actually already clarified that.
                            You need to call it inside your project/build directory (from where you called qmake).

                            J Offline
                            J Offline
                            joseph_ho
                            wrote on last edited by
                            #15

                            @jsulm could you provide an example? I'm really confused by all this

                            jsulmJ 1 Reply Last reply
                            0
                            • J joseph_ho

                              @jsulm could you provide an example? I'm really confused by all this

                              jsulmJ Online
                              jsulmJ Online
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              @joseph_ho

                              cd YOUR_PROJECT_DIR
                              PATH_TO_YOUR_QMAKE/qmake.exe
                              PATH_TO_YOUR_MAKE/mingw32-make.exe
                              

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              J 1 Reply Last reply
                              2
                              • jsulmJ jsulm

                                @joseph_ho

                                cd YOUR_PROJECT_DIR
                                PATH_TO_YOUR_QMAKE/qmake.exe
                                PATH_TO_YOUR_MAKE/mingw32-make.exe
                                
                                J Offline
                                J Offline
                                joseph_ho
                                wrote on last edited by
                                #17

                                @jsulm its something like this, is it?

                                af05756d-4b22-446c-9230-385f3481ef87-image.png

                                jsulmJ 1 Reply Last reply
                                0
                                • J joseph_ho

                                  @jsulm its something like this, is it?

                                  af05756d-4b22-446c-9230-385f3481ef87-image.png

                                  jsulmJ Online
                                  jsulmJ Online
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #18

                                  @joseph_ho You should use the command prompt from MinGW installation, then the environment will be setup and ready.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  1

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved