-
-
Notifications
You must be signed in to change notification settings - Fork 373
Building on windows with msys2 and mingw64 (WIP)
Regina Obe edited this page Mar 1, 2023
·
5 revisions
- Download msys2 from https://www.msys2.org/ and run the exe installer
- After installing, launch the mingw64.exe
- Run the following commands
pacman -Syu
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
pacman --needed -S git mingw-w64-x86_64-cmake mingw-w64-x86_64-postgresql mingw-w64-x86_64-postgis
- Launch PostgreSQL
#now initialize postgresql cluster
initdb -D C:/temp/pgsql
# start the cluster
pg_ctl -D C:/temp/pgsql -l logfile start
- Connect to PostgreSQL and create test db
psql -d postgres #connect to postgres database
# in psql shell
SELECT version(); -- outputs the version
CREATE DATABASE gisdb;
\c gisdb
CREATE EXTENSION postgis;
SELECT postgis_full_version();
exit
- Download and try to build pgrouting
# back in shell
mkdir C:/projects
cd C:/projects
git clone https://github.com/pgRouting/pgRouting.git
cd pgRouting
cmake --version #returns cmake version 3.25.2
mkdir build
cd build
cmake -G"Unix Makefiles" ..
cmake --build . #currently fails here with errors
make install