[Gdal-dev] Exception thrown in GDALOpen() function

Ed McNierney ed at topozone.com
Sun Aug 3 07:45:01 EDT 2003

Frank -

It's not a calling convention problem.  The compiler inserts the name of
the appropriate run-time library in the object module when compiling, so
the linker will automatically look for it.  If you compile some objects
debug and some non-debug, the compiler will have inserted both library
names into those objects; when you go to link, both runtime libraries
will be linked and you will get symbol redefinition conflicts.

This can be worked around by telling the linker to ignore all libraries
specified in the object modules and then explicitly listing all the
libraries you need, but that's pretty tedious and many users don't
understand how to do it (or how to do it correctly).

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: (978) 251-4242  Fax: (978) 251-1396
ed at topozone.com

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Saturday, August 02, 2003 9:29 PM
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Exception thrown in GDALOpen() function

Ben Discoe wrote:
> Noureddine,
> It is quite likely that you are using the debug-mode GDAL with your
> release-mode applications, or vice-versa.  They must match.  This
> that in order to develop application in both debug and release mode,
> need to build GDAL both ways.


Could you clarify why non-debug applications can't use debug versions of
the library and the other way around?  It seems to me I often do this
without problems.  Is it some difference in calling conventions or
like that?

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

Gdal-dev mailing list
Gdal-dev at remotesensing.org

More information about the Gdal-dev mailing list