[Gdal-dev] Programming with GDAL in Windows XP using DEV-C++ or CodeBlocks

Zack Stauber zstauber at bhinc.com
Wed Dec 9 15:43:22 EST 2009


I've programmed against the binary FWTools installs under Windows using
Visual Studio 2005.  It's a bit easier for me than linking against the GDAL
source because I couldn't manage to find and configure the correct versions
of all the extra stuff that's in FWTools that I use, like the MrSID SDK,
Boost, JPEG and TIFF libs, Jasper, and all that.  Now anything I compile
just looks for a few DLL's under C:\Program Files\FWTools or C:\Program
Files(x86)\FWTools and works.

If you're using C++ just go into your project properties (not solution
properties) set the Configuration to "All Configurations, then under C/C++
General add:
"$(ProgramFiles)\FWTools2.4.6\include" to your additional include
directories
then under Linker General
"$(ProgramFiles)\FWTools2.4.6\lib" to your additional library directories
and under Linker Input
gdal_i.lib geos_i.lib (at least) to your additional dependencies

Now under any *.cpp source file, add
#include "gdal.h"
And whatever other .h files have the functions you need to use.  ogr_api.h
will have most of the vector stuff, but for rasters gdal.h will probably do
it.

I know you said CodeBlocks, but maybe it is similar.  There is a free
version of Visual Studio Express that works the same way for C++ so in a
pinch it can still all be pretty cheap.
-- 
View this message in context: http://n2.nabble.com/Programming-with-GDAL-in-Windows-XP-using-DEV-C-or-CodeBlocks-tp3697752p4141840.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list