The C++ Compiler cannot run a simple test program
-
You should check your global
PATH
environment variable.At https://github.com/isl-org/Open3D/issues/2316 it's being mentioned:
Error MSB3073 is generally caused by an incorrect path in the command line
You can type in Qt Creator in the Locator field (press
Ctrl+K
):! cmd /c set PATH
In the General Messages pane you should get the output. Maybe you can paste it here.
This could explain why so many command line tools are broken.
On this Arm64 Laptop I have something like:
Starting command "cmd /c set PATH". Path=C:\Projects\github\vcpkg;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\Cristian\AppData\Local\Programs\Python\Python311-arm64\Scripts\;C:\Users\Cristian\AppData\Local\Programs\Python\Python311-arm64\;C:\Users\Cristian\AppData\Local\Microsoft\WindowsApps;C:\Users\Cristian\AppData\Local\Microsoft\WinGet\Links;c:\Tools\cmake\bin;c:\Tools\ninja;c:\Tools\ccache;;C:\Users\Cristian\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Cristian\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.ProcessExplorer_Microsoft.Winget.Source_8wekyb3d8bbwe; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC The command "cmd /c set PATH" finished successfully.
And for me all the things just work. Qt 6.5.0 with MSVC and MinGW.
-
On this Arm64 Laptop I have something like:
Starting command "cmd /c set PATH". Path=C:\Projects\github\vcpkg;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\Cristian\AppData\Local\Programs\Python\Python311-arm64\Scripts\;C:\Users\Cristian\AppData\Local\Programs\Python\Python311-arm64\;C:\Users\Cristian\AppData\Local\Microsoft\WindowsApps;C:\Users\Cristian\AppData\Local\Microsoft\WinGet\Links;c:\Tools\cmake\bin;c:\Tools\ninja;c:\Tools\ccache;;C:\Users\Cristian\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Cristian\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.ProcessExplorer_Microsoft.Winget.Source_8wekyb3d8bbwe; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC The command "cmd /c set PATH" finished successfully.
And for me all the things just work. Qt 6.5.0 with MSVC and MinGW.
@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-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@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;.MSCI can't see anything that would break things 😔
How does the MSVC Kit with
NMake Makefiles JOM
generator work? -
@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;.MSCI can't see anything that would break things 😔
How does the MSVC Kit with
NMake Makefiles JOM
generator work?@cristian-adam
the build button was disabled againoops I accidentally marked it as solved
-
-
-
QMake sometimes is simpler than CMake for simple applications.
-
@cristian-adam
the build button was disabled againoops I accidentally marked it as solved
@Daemonitas
I got this pop up now when compiling using the msvc kit -
@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
-
@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
@Orkun-Tokdemir
you mean this one?
-
@Orkun-Tokdemir
you mean this one?
@Daemonitas yes
-
@Orkun-Tokdemir
well clearly it works
perhaps the problem is actually my laptop itself
but what causes this in the first place -
@Orkun-Tokdemir
well clearly it works
perhaps the problem is actually my laptop itself
but what causes this in the first place@Daemonitas Did you run it as below?
"C:Qt/Tools/mingw120_64/bin/c++.exe" hello.cpp -o hello
-
@Daemonitas Did you run it as below?
"C:Qt/Tools/mingw120_64/bin/c++.exe" hello.cpp -o hello
@Orkun-Tokdemir
yes It works fine -
@Orkun-Tokdemir
yes It works fineThere 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:
- some sort of a disk failure
- 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.
-
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:
- some sort of a disk failure
- 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.
@cristian-adam
so I reinstalled windows and mingw works
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. -