Trying to get cross compiling working on centos7. (I have jenkins running in that environment.) There is a lot of out of date documentation on the web for mingw. Apparently there was an answer here but is gone. The cross compilation steps are discussed here. I can do a sudo yum groupinstall -y packagename, but nothing I try works (MinGW-64 mingw-64 mingw64, MinGW64, or MinGW cross-compiler) as I have seen in various posts and forums. I also tried downloading the source but had no luck with that also as various pre-requsites are missing, and when I try and obtain them they don't exist or are the wrong version.
With the EPEL repo installed you can install
yum install mingw64-gcc
Finally located a compiled binary (good enough for my purposes) that will work. Here is the 64 bit binary for linux (prebuilt, just DL, and unpack it and upload the tar to the box). You will need to create an /opt/mingw64 directory and untar the file in that directory (sudo tar -xvf ~/mingw-w64-bin_x86_64-linux_20131228.tar) for ex. https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/ http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/
The compiler will be /opt/mingw64/bin/x86_64-w64-mingw32-gcc instead of just gcc. The reason for this is that we should be able to pick the right gcc, even if there are multiple compilers in the PATH environment.