Version 7 (modified by ajolma, 8 years ago) (diff)


Get MinGW-5.1.3 exe, MSYS-1.0.10.exe, w32api-3.8.tar.gz, binutils-2.17.50-20060824-1.tar.gz and install them (this may not be a comprehensive list but start with MinGW and execute the install package and try to add gcc etc. - the tar packages you just unpack to c:\mingw). Then open MSYS prompt, go to the dir where you unpacked GDAL, and issue commands (but see below for configure switches):

make install

And you should have libgdal-1.dll in your c:\msys\1.0\local\bin and libgdal-1.dll.a in c:\msys\1.0\local\lib.


Edit libtool at line 6114 to sed out the MSYS-anchored absolute path and replace it by a relative path or possibly a Windows drive-based absolute path.


Edit GNUmakefile on lines 6-12 and replace $(GDAL_ROOT) with . (a dot).


By default configure tries to add support for Expat. To enable it, use configure switch --with-expat=/c/mingw, get libexpat.dll and create an import library into /c/mingw/lib with commands (in mingw\bin):

pexports libexpat.dll | perl >libexpat.def
dlltool -d libexpat.def -l ..\lib\libexpat.dll.a

where is a small perl program to add an underscored alias:

while (<STDIN>) {
    $a = $_;
    print $_;
    if (/^XML/) {
        print '_'."$_ = $a";

see also


If you have a development version of GTK+ installed, its (old) libtiff may confuse the building. It is best to use --with-libtiff=internal and move tiff headers and libraries away from sight.

configure detects GTK+ provided libz, libpng and libjpeg but in compile time zlib.h etc are not found. This correct way to fix this is probably to use --with-jpeg=/c/gtk/include --with-libz=/c/gtk/include --with-png=/c/gtk/include.

PostgreSQL and PostGIS:

I've successfully used