Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. The C++ Compiler cannot run a simple test program

The C++ Compiler cannot run a simple test program

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
47 Posts 6 Posters 11.8k Views
  • 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.
  • D Daemonitas

    @cristian-adam
    Path=C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Cloudflare\Cloudflare WARP;C:\Program Files\dotnet;C:\Program Files\Java\jdk-19\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Qt\Tools\QtCreator\bin;D:\MinGw\bin;C:\cmake-3.26.3-windows-x86_64\cmake-3.26.3-windows-x86_64\bin;C:\Users-redacted-\AppData\Local\Microsoft\WindowsApps;C:\Users-redacted-\Documents\MinGW\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    cristian-adamC Offline
    cristian-adamC Offline
    cristian-adam
    wrote on last edited by
    #36

    @Daemonitas said in The C++ Compiler cannot run a simple test program:

    @cristian-adam
    Path=C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Cloudflare\Cloudflare WARP;C:\Program Files\dotnet;C:\Program Files\Java\jdk-19\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Qt\Tools\QtCreator\bin;D:\MinGw\bin;C:\cmake-3.26.3-windows-x86_64\cmake-3.26.3-windows-x86_64\bin;C:\Users-redacted-\AppData\Local\Microsoft\WindowsApps;C:\Users-redacted-\Documents\MinGW\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    I can't see anything that would break things 😔

    How does the MSVC Kit with NMake Makefiles JOM generator work?

    D 1 Reply Last reply
    0
    • cristian-adamC cristian-adam

      @Daemonitas said in The C++ Compiler cannot run a simple test program:

      @cristian-adam
      Path=C:\Program Files\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Cloudflare\Cloudflare WARP;C:\Program Files\dotnet;C:\Program Files\Java\jdk-19\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Qt\Tools\QtCreator\bin;D:\MinGw\bin;C:\cmake-3.26.3-windows-x86_64\cmake-3.26.3-windows-x86_64\bin;C:\Users-redacted-\AppData\Local\Microsoft\WindowsApps;C:\Users-redacted-\Documents\MinGW\bin
      PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

      I can't see anything that would break things 😔

      How does the MSVC Kit with NMake Makefiles JOM generator work?

      D Offline
      D Offline
      Daemonitas
      wrote on last edited by Daemonitas
      #37

      @cristian-adam
      the build button was disabled again

      oops I accidentally marked it as solved

      D 1 Reply Last reply
      0
      • D Daemonitas has marked this topic as solved on
      • D Daemonitas has marked this topic as unsolved on
      • goldenhawkingG Offline
        goldenhawkingG Offline
        goldenhawking
        wrote on last edited by
        #38

        QMake sometimes is simpler than CMake for simple applications.

        Qt is the best C++ framework I've ever met.

        1 Reply Last reply
        0
        • D Daemonitas

          @cristian-adam
          the build button was disabled again

          oops I accidentally marked it as solved

          D Offline
          D Offline
          Daemonitas
          wrote on last edited by
          #39

          @Daemonitas
          f65d87ee-ebe6-4859-955f-fde729cdbbee-image.png
          I got this pop up now when compiling using the msvc kit

          1 Reply Last reply
          0
          • D Daemonitas

            @cristian-adam
            So I do this right?
            c298d862-11f9-4609-9dee-a6642e07f74b-image.png

            And this is after I disabled windows defender

            f7b2b3f0-3b86-40cc-84a3-0728392df105-image.png

            O Offline
            O Offline
            Orkun Tokdemir
            wrote on last edited by
            #40

            @Daemonitas Can you compile anything with the compiler CMake found?
            Can you please try it with the hello word code?

            <the full path I highlighted>  hello.cpp -o hello 
            

            bc080015-b7a0-4432-8150-6c2de00f10c5-image.png

            D 1 Reply Last reply
            0
            • O Orkun Tokdemir

              @Daemonitas Can you compile anything with the compiler CMake found?
              Can you please try it with the hello word code?

              <the full path I highlighted>  hello.cpp -o hello 
              

              bc080015-b7a0-4432-8150-6c2de00f10c5-image.png

              D Offline
              D Offline
              Daemonitas
              wrote on last edited by
              #41

              @Orkun-Tokdemir
              you mean this one?
              23ca8fb9-2b0f-4597-8f17-3ff3738949c9-image.png

              O 1 Reply Last reply
              0
              • D Daemonitas

                @Orkun-Tokdemir
                you mean this one?
                23ca8fb9-2b0f-4597-8f17-3ff3738949c9-image.png

                O Offline
                O Offline
                Orkun Tokdemir
                wrote on last edited by
                #42

                @Daemonitas yes

                D 1 Reply Last reply
                0
                • O Orkun Tokdemir

                  @Daemonitas yes

                  D Offline
                  D Offline
                  Daemonitas
                  wrote on last edited by
                  #43

                  @Orkun-Tokdemir
                  well clearly it works
                  perhaps the problem is actually my laptop itself
                  but what causes this in the first place

                  O 1 Reply Last reply
                  0
                  • D Daemonitas

                    @Orkun-Tokdemir
                    well clearly it works
                    perhaps the problem is actually my laptop itself
                    but what causes this in the first place

                    O Offline
                    O Offline
                    Orkun Tokdemir
                    wrote on last edited by
                    #44

                    @Daemonitas Did you run it as below?

                    "C:Qt/Tools/mingw120_64/bin/c++.exe"  hello.cpp -o hello
                    
                    D 1 Reply Last reply
                    0
                    • O Orkun Tokdemir

                      @Daemonitas Did you run it as below?

                      "C:Qt/Tools/mingw120_64/bin/c++.exe"  hello.cpp -o hello
                      
                      D Offline
                      D Offline
                      Daemonitas
                      wrote on last edited by
                      #45

                      @Orkun-Tokdemir
                      yes It works fine

                      cristian-adamC 1 Reply Last reply
                      0
                      • D Daemonitas

                        @Orkun-Tokdemir
                        yes It works fine

                        cristian-adamC Offline
                        cristian-adamC Offline
                        cristian-adam
                        wrote on last edited by
                        #46

                        There is something wrong with your Windows installation / laptop.

                        The compilers themselves seem to work, but not the build programs (ninja, mingw32-make, msbuild, jom).

                        The antivirus is not the issue. I can think of two issues:

                        1. some sort of a disk failure
                        2. some user rights access issues

                        You can get yourself a Windows Virtual Machine from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

                        That is if the laptop is powerful enough to run a VM.

                        D 1 Reply Last reply
                        2
                        • cristian-adamC cristian-adam

                          There is something wrong with your Windows installation / laptop.

                          The compilers themselves seem to work, but not the build programs (ninja, mingw32-make, msbuild, jom).

                          The antivirus is not the issue. I can think of two issues:

                          1. some sort of a disk failure
                          2. some user rights access issues

                          You can get yourself a Windows Virtual Machine from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/

                          That is if the laptop is powerful enough to run a VM.

                          D Offline
                          D Offline
                          Daemonitas
                          wrote on last edited by Daemonitas
                          #47

                          @cristian-adam
                          so I reinstalled windows and mingw works
                          9b2ad2bd-7bf5-4f56-adf8-4dbda248ec86-image.png
                          msvc said its missing cxx compiler path but hey atleast mingw works so I guess problem solved
                          my windows is the problem after all. Had to sacrifice my files but as long as it works its a win in my book.

                          1 Reply Last reply
                          2
                          • D Daemonitas has marked this topic as solved on

                          • Login

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