Well, it's more like a two-part question. I was following step by step this youtube tutorial about setting up visual studio code and trying different compilers(I went to winlibs and downloaded Win64: Zip archive version) and everything was great until 35:30 where the terminal output was fatal error: cannot execute 'cc1plus': CreateProcess: No such file or directory compilation terminated.
I uninstalled and repeated the process several times but the problem remained. I followed some other tutorials about fixing the problem but it didn't work and soon after something else came up. I uninstalled and installed again the compilers and when I tried to find them in the command prompt clang++ --version
worked and gcc --version
but when I tried the g++ --version
this appeared on the screen.Screenshot Saying this can't run on your pc or whatever. I really need some help did I do something wrong? How do I fix both these issues (terminal error and this app cant run on your PC) I ran a virus scan,SFC scan, I run command prompt as administrator, and this does work but at the beginning I didn't have to do that and if I don't choose that option still says that and it's really frustrating. I would really appreciate some help. Thanks in advance!
Asked
Active
Viewed 938 times
0

codeling
- 11,056
- 4
- 42
- 71

Nikos Mpekertzis
- 1
- 1
-
1Use msys2 for that. [https://www.msys2.org/](https://www.msys2.org/) – drescherjm Apr 08 '22 at 12:36
-
VSCode even tells you to do that in its documentation: [https://code.visualstudio.com/docs/cpp/config-mingw](https://code.visualstudio.com/docs/cpp/config-mingw) – drescherjm Apr 08 '22 at 12:37
-
There is also this question: [https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2](https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2) – drescherjm Apr 08 '22 at 13:00
-
I am sorry. I don't have access to a windows 11 machine so I can't test that OS. All of the windows machines at home and work are windows 10. I do use msys2 to provide my mingw however. – drescherjm Apr 08 '22 at 13:17
-
I did everything i followed every step but still I cant run g++ -- version command – Nikos Mpekertzis Apr 08 '22 at 13:18
-
is there any difference when I run command prompt as administrator rather by just opening it the normal way, because running it as administrator seems to work. Although it really concerns me that it says that I m thinking I did something stupid – Nikos Mpekertzis Apr 08 '22 at 13:20
-
I don't launch the command prompt via the "Run as administrator" I either build in the `"C:\msys64\mingw64.exe"` terminal or in VSCode when I use mingw. At work I primarily use msvc. – drescherjm Apr 08 '22 at 13:23
-
yea when i run g++ --version command on "C:\msys64\mingw64.exe" workos as well as opening command prompt as administrator. I ll get that "This app cant run on your PC" which pops up by putting the g++ --version command on the command prompt without running it as administrator error checked because it really concerns me. Thanks for your help i think my main problem is fixed – Nikos Mpekertzis Apr 08 '22 at 13:31