Dipole Consulting SPRL

Building GDAL with MSVC Toolkit 2003 PDF Print E-mail
Here is a little howto to build gdal 1.4.0 with MSVC Toolkit 2003,
latest GEOS 3 lib and Python NG bindings.
 
The built library is available  here .
 
The patch mentionned in the article is availabe here .
 

 

 

1. GEOS :


Latest svn release (3.0.0RC1 17/01/2007) of GEOS must be modified in
order to be compiled :
 
  • capi/geos_c.h.in -> capi/geos_c.h
  • source\headers\geos\version.h.in --> source\headers\geos\version.h
  • source\headers\geos\platform.h.vc --> source\headers\geos\platform.h

In the files geos_c.h and version.h, update the @VERSION_MAJOR@,
@VERSION_MINOR@, @VERSION_PATCH@, @VERSION@ to the right values (3, 0, 0
and 3.0.0 in my case).

According to some info, I haven't updated @JTS_PORT@, nor the
@CAPI_VERSION_MAJOR@, etc.

Then :

GEOS_SOURCE\source\>nmake -f makefile.vc


There is no install target in the makefile, so you should copy the
produced dll into a directory in yout PATH (or update your path ...).

2. GDAL 1.4.0


Update the nmake.opt to match your installation (GDAL_HOME, GEOS libs,
Python install, etc),

GDAL_SOURCE\>nmake -f makefile.vc

Install the files into your GDAL_HOME

GDAL_SOURCE\>nmake -f makefile.vc install

After having built and installed gdal, build the new swig interface
going in the swig directory :

GDAL_SOURCE\swig\>nmake -f makefile.vc python

! Your python installation must have a numpy version > 1 (I've added a
test in the GDAL_SOURCE\swig\python\setup.py file)

I have modified the GDAL_SOURCE\swig\makefile.vc in order to install the
python modules after having them built (see the attached patch). This
will install the modules into your Python installation directory (C:
\Python24\Lib\site-packages\ on my computer). Otherwise your PYTHONPATH must point to the pymod directory.
 
Then, after having updated the PATH environment variables so that it
includes $GDAL_HOME\bin\ (path to the gdal14.dll), you can use GDAL 1.4
with it's new-generation python interface.
Last Updated ( vendredi, 09 mars 2007 )
 
< Prev
Main Menu
Home
Services
Products
References
Technical
Jobs
Downloads
Links
Contact Us
Login Form





Lost Password?
No account yet? Register
Newsflash
The JWaveLib 1.1.0 has been released on the 31th of July. A heavy refactoring work has been done on the existing code base to improve the use of the JWavelib by the different tools and products build on top of it (JWaveLib for eWON , WaveSniffer ).