[Gdal-dev] What's necessary to use GDAL/OGR Libery!

Frank Warmerdam warmerdam at pobox.com
Mon Jul 14 10:13:38 EDT 2003

Markus Reichert wrote:
> But now, I ask myself, which of all the libs, dlls and
> header files I really need to build a program that is
> using GDAL/OGR functionality and how to build them in
> one dirctory so I can use them easily in another
> Visual Studio project (best without using a
> makefile)?? 
> In the online documentation I have not found
> information about such "simple" problems - sorry!


In order to build projects that build and link against GDAL/OGR it is
generally easiest to "install" GDAL.  This will copy the required include
files, DLLs and so forth into a seperate set of directories.  To configure
this modify the following variables in the gdal\nmake.opt file to your
liking ... the defaults are really just what I do on my machine and not
that great for general use:

BINDIR = D:\bin
PY_INST_DIR = D:\bin\pymod
LIBDIR = D:\bin\lib
INCDIR = D:\bin\include
DATADIR = D:\bin\data

Now when building a project your should include the INCDIR in your include
path, the LIBDIR in your libpath, and BINDIR in your path. All the include
files you need should be installed intot he INCDIR directory for instance.
The only library you should need to link against is gdal_i.lib, the stub
library for gdal11.dll.  Depending on your build options there may be
lots of other DLLs also required, but you will need to track that yourself.
For instance the DLLs for ECW, Oracle, OGDI, etc.

I hope this helps.  I have updated the GDAL building page in CVS to reflect
some of this information.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Gdal-dev mailing list