I am trying to install ming_w64 using msys2. I used the following command to install it:
pacman -S mingw-w64-x86_64-toolchain
After installing compiling gives the following error:
$ g++ test.cpp
g++.exe: fatal error: cannot execute 'cc1plus': CreateProcess: No such file or directory
compilation terminated.
After reinstalling ming_w64 this is shown:
:: Proceed with installation? [Y/n]
(19/19) checking keys in keyring [##################################] 100%
(19/19) checking package integrity [##################################] 100%
(19/19) loading package files [##################################] 100%
(19/19) checking for file conflicts [##################################] 100%
(19/19) checking available disk space [##################################] 100%
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/cc1plus.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/lto1.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/gnat1.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/f951.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/cc1obj.exe
warning: could not get file information for mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0/cc1objplus.exe
Even after reinstalling I am unable to find cc1plus.exe in mingw64/lib/gcc/x86_64-w64-mingw32/11.2.0
How do I fix this?
Thanks to HolyBlackCat I solved it. It was Windows Defender which was deleting those files. Excluding that folder fixed it.