Compiling with MSYS2

OK, here’s the MSYS2 installation:

  • install msys2 from msys2.org
  • pacman -Syu
  • pacman -Syu
  • pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake git make mingw-w64-x86_64-libjpeg mingw-w64-x86_64-xpm-nox mingw-w64-x86_64-libyaml mingw-w64-x86_64-diffutils mingw-w64-x86_64-pcre mingw-w64-x86_64-db libdb-devel
  • ftp: download libuuid-1.6.2.tar.gz from ftp (dot) ossp (dot) org/pkg/lib/uuid/, configure --prefix=/usr/local, make, make install, ignore the error relating to strip.exe
  • git clone https://github.com/SWI-Prolog/swipl-devel.git
  • cd swipl-devel
  • git submodule update --init
  • mkdir build
  • cd build
  • cmake -DMINGW_ROOT=/mingw64 -DLIBUUID_INCLUDE_DIR=/usr/local/include -DUUID_LIBRARY=/usr/local/lib/libuuid.a -DBDB_LIBRARY=/mingw64/bin/libdb-6.0.dll -DINSTALL_DOCUMENTATION=OFF -DSWIPL_PACKAGES_X=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr/local -G “MSYS Makefiles” …
  • only dot dot in the previous line, and avoid “typographic” quotation marks
  • make
  • make install
  • start swipl

@Jan, please consider removing the description from the webpage (with mingw under windows)

https://www.swi-prolog.org/build/MinGW.txt

Since this is now really outdated.

1 Like