Issue
I want to build a program with a jenkins windows 7 node. The program is build using cmake but in the configure stage cmake tells me that there is no g++ compiler. I think this error occurs due to the wrong shell but I don't know how to set the right shell. The documentation says that the first sh file on windows is executed but msys2 needs mingw32.exe as the correct shell.
Solution
There are several ways start MinGW shell:
- Set env variable with
set MSYSTEM=mingw32
orset MSYSTEM=mingw64
. Then startmsys2_shell.cmd
orusr/bin/bash --login
. - Start
msys2_shell.cmd
with-mingw32
or-mingw64
arg. - Type in MSYS2
source shell <name>
where can be:msys
,mingw32
,mingw64
. - Install
msys2-launcher-git
and runmingw32.exe
ormingw64.exe
Answered By - mati865