Hi,
I haven't tried this with MSYS2 for a long time. I custom-build Gecode to exclude the Qt dependency and to use the same toolchain as the main app.
It looks like you're using the VC compiler (cl.exe), so perhaps what I do would work for you as well.
- I use Cygwin (to build, get the current version of cygwin, make sure to include
bash, diff, patch, make, perl, perhaps also svn, git; re-run the installer to add more as you stumble on missing tools).
- Run Visual Studio command line as Administrator ("Run As Administrator") - x86 Native Tools in your case
- In this command prompt (adjust for your version of VS)
- cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
- vcvarsall.bat x86
(vcvarsall also accepts the SDK version if you need to target a particular version of the SDK for your app)
- run cygwin (perhaps c:\cygwin\cygwin) from the same command prompt
- in cygwin CD to your gecode root (e.g. cd /cygdrive/c/BUILD/gecode-6.2.0)
- export "CXXFLAGS=/FS /std:c++20 /permissive"
- chmod a+rwx *
- ./configure --disable-examples --disable-qt --disable-gist --disable-gmp --disable-mpfr --prefix=`pwd`/x86rel
- make -j8 install
- chmod a+rwx -R x*
You may adjust the CXXFLAGS to the ISO C++ standard of your choice (c++17 or c++14 would probably work fine). "/permissive" is needed when targeting Windows SDK 8.1 (and maybe other SDKs too, I haven't tried). "/FS" is needed so that multi-core compilation does not fail. The "chmod"s are needed so that you can access the built files from outside Cygwin.
Of course you may opt to not "--disable" components that you wish to use. Using gmp, mpfr, and Qt (needed for Gist) brings additional dependencies and license implications.
Hopefully this helps :)
Cheers,
Filip