wiki:DevWikiWinMingW64_21

Version 19 (modified by robe, 11 years ago) ( diff )

Compiling using Mingw64-w64, Mingw64-w32 for 64-bit/32-bit (work in Progress)

Back to Compiling in Windows

If you want to get to the last step fast to immediately start compiling PostGIS without having to compile the dependencies, you can download our prepared mingw64+msys build environment which you can download from http://www.bostongis.com/postgisstuff/ming64.zip and for 32-bit (for PostgreSQL 9.2+ (32-bit 9.1 and below have to use old msys chain) http://www.bostongis.com/postgisstuff/ming32.zip Then you just extract the zip so you have ming32 and or ming64 on your C:\ming32, C:\ming64 and launch the corresponding msys\msys.bat

If you want to start with your own mingw64 install and then add additional items refer to DevWikiMingW64_Setup

variables used

For building we always have these variables defined in our sh scripts You can switch the 64 to 32 if you are building with our ming32 environment.

export OS_BUILD=64
export PROJECTS=/c/ming${OS_BUILD}/projects
if [ "$OS_BUILD" == "64" ] ; then
	export MINGHOST=x86_64-w64-mingw32
else
	export MINGHOST=i686-w64-mingw32
fi;

create project folders

The download files we have above already have these folders and we like to keep each set separate. The below we set to 64 for our ming64 folder

cd ${PROJECTS}
 mkdir pgx${OS_BUILD}
 mkdir postgresql
 mkdir geos
 mkdir proj
 mkdir docbook


GDAL

export GDAL_VER=1.10.0
cd ${PROJECTS}/gdal
wget http://download.osgeo.org/gdal/gdal-${GDAL_VER}.tar.gz
tar xvfz gdal-${GDAL_VER}.tar.gz
cd gdal-${GDAL_VER}
./configure --host=${MINGHOST}--build=x86_64-w64-mingw32 --with-threads=no --prefix=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD} 
make && make install
cd ${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/bin
strip *.dll

DOWNLOAD DOCBOOK

cd ${PROJECTS}/docbook

Download the latest Docbook from http://sourceforge.net/projects/docbook/files/docbook-xsl/ into that folder and untar.

Extract somewhere. In this case I chose my projects folder. You'll need to set this folder for the —with-xsldir setting

You should have a folder now docbook/docbook-xsl-1.76.1 or something similar

4. Compiling GEOS

Download latest GEOS source from http://trac.osgeo.org/geos/ You can also use the trunk svn version https://svn.osgeo.org/geos/trunk which is what we use. NOTE: To take advantage of new functions like ST_DelaunayTriangles, you need GEOS 3.4dev which is trunk If you are using svn version, make sure to run:

sh autogen.sh

—- TO BE CONTINUED —

Note: See TracWiki for help on using the wiki.