[Gdal-dev] Separate naming for debug libraries on Windows

Ben Discoe ben at vterrain.org
Thu Jun 26 00:28:32 EDT 2003


I've discovered that because of some cross-over in passing memory
around, it's actually vital that applications using MSVC build with a
GDAL version using the same flavor of standard library - in particular,
debug vs. release.

The drawback to doing this is that the current makefiles (nmake.opt,
makefile.vc, etc.) produce the same name for the .lib and .dll for both
debug and release builds.  Trying to build both overwrites each other.
This is unlike nearly all other libraries that i have experience with,
e.g OSG create "osg.dll" in release and "osgd.dll" in debug.

So, i modified the MSVC makefiles to produce two sets of output files.
In release:
	gdal_i.lib
	gdal.dll (as before.)
In debug:
	gdal_i_dbg.lib
	gdal_dbg.dll

This allows the apps to link and run with the correct library and solves
all sorts of nasty memory-related crashes.

May i offer y'all the changed makefiles?

-Ben




More information about the Gdal-dev mailing list