I have just downloaded the C++ compiler MinGW, checked everything in the MinGW Installation Manager, and put the \bin location. But when I test the compiler in one of my C++ compilers, I get the following error:
gcc: fatal error: cannot execute 'cc1plus': CreateProcess: No such file or directory
compilation terminated.
I would appreciate it if I would get an idea on how to fix the compiler!
Install gcc-c++ or g++, and then set the environment variable.
You can also run g++ -v to check whether g++ was installed correctly or not.
Had this error recently while setting up cpp env in ubuntu. Turned out I had multiple versions of g++ installed. Got help from this thread. Using type -a g++ command I was able to locate the executables for g++
Output:
g++ is ~/x86_64-linux-musl-native/bin/g++
g++ is ~/x86_64-linux-musl-native/bin/g++
g++ is /usr/bin/g++
g++ is /bin/g++
Besides running any the binaries, I was able to get the file to compile using g++-11 main.cpp -o output
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With