Find and install MinGW and MSYS. Start from

Install g++ but do not install MinGW make.

I suggest creating a dev.bat, where changes to PATH are collected:



Perl is the base of all higher level tools in Geoinformatica. The following assumes Perl 5.10.0

The in win32/ is the build configuration. I'm adding -mms-bitfields to line 525. see this discussion

BUILDOPT	+= -fno-strict-aliasing -DPERL_MSVCRT_READFIX -mms-bitfields

Also, I change INST_TOP to $(INST_DRV)\Geoinformatica

The build is easy, in dos command prompt:

dmake install

Perl modules are always built in shell using dmake, which is available at CPAN as Perl itself.

lib/ExtUtils/Liblist/ needs to be patched with (works for EU::MM 6.52) to make it find import libraries that end with .dll.a

Save to a file called diff, and issue command

patch -p0 <diff

in msys shell.



I'm not building these myself. We'll need both and

since we need Gtk2::GladeWin

Glib, Cairo, Pango, Gtk2, and Gtk2-GladeXML modules

All these modules can be found from

ExtUtils::Depends and ExtUtils::PkgConfig are prerequisites to these and also available at the above page. Currently the needs to be patched with a patch attached to this bug report

Also pango.exports needs (1.220)


and newSVPangoRectangle and SvPangoRectangle need to be removed from Gtk2.exports (1.220).

Data access and geo libraries

These are built in MSYS. Most are used by GDAL.

  • pq to access data in PostgreSQL and PostGIS
    • it's possible to use the libpq from the Windows ports of these
  • expat, needed for curl
    • there's a good Windows port with devel support available in it's home page
  • curl, needed for WMS, WCS, WFS
  • GEOS for simple features methods
  • Proj4 for cartographic projections
    • the DLL needs to be made manually:
cd src
gcc -shared -o libproj.dll -Wl,--out-implib=libproj.dll.a \
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive \
.libs/libproj.a -Wl,--no-whole-archive /c/mingw/lib/libmingw32.a

See also this

  • GDAL
    • GTK+ may cause problems because it contains libtiff, I move libtiff includes away and use the internal libtiff
    • $(GDAL_ROOT)/ needs to be removed from GNUmakefile
    • I've made a gdal.pc, which is used by Geo::Raster and Geo::Vector
      Name: GDAL
      Description: Geospatial Data Abstraction Library
      Version: 1.7.0
      Requires: libcurl xerces-c
      Libs:  -L${exec_prefix}/lib -lgdal.dll -lgeos.dll -lgeos_c.dll -lexpat -lpq -ljpeg -lpng12 -lz
      Cflags:  -I${prefix}/include
  • libral
    • there's a MinGW specific Makefile, use it The DLL's may be bloated because of debug code, use strip --strip-debug x.dll to remove it.

Perl interface to GDAL

In CPAN there is Geo::GDAL, whose latest version is for the latest version of GDAL. It is in practice the same as the one distributed with the GDAL source code. I recommend that you always build the Geo::GDAL module separately from GDAL itself, after you have built and installed GDAL. In the GDAL source directory, while in MSYS, say (this requires swig):

cd swig/perl
rm *wrap*
make generate

Then in dos command prompt

perl Makefile.PL
make test
make install

Geo::Raster and Geo::Vector

These two modules are interdependent, so dmake install both before running dmake test in either (this is a bug that should be corrected).


In a case the image-base in Makefile had to be changed to the actual base, shown by the depends -tool.

Last modified 9 years ago Last modified on Jun 15, 2009 6:55:38 AM