[FWTools] Debugging under Windows XP and Visual Studio .Net

Frank Warmerdam warmerdam at pobox.com
Thu Nov 30 16:41:32 EST 2006


Martin Fix wrote:
> Hi,
> 
> I'm looking for help on the following setup:
> 
> - Windows XP
> - Visual Studio 2005 .Net
> - GDAL 1.3.1 compiled for debug with VC7
> - a project under Visual Studio 2005 .Net (unmanaged code) using the 
> compiled GDAL.DLL
> - CPL_DEBUG=ON in environment
> 
> I now want to get the CPLError messages generated by GDAL.DLL for 
> example on OGRSpatialReference::Validate() to find out what is wrong 
> with my coordinate system definition.

Martin,

Generally speaking the errors will be emitted to stderr when they are
issued.  If stderr doesn't go anywhere in your case (perhaps a win32
gui app) then it might be prudent to install the "logging" error handler
to capture errors to a log.

eg.

    CPLSetConfigOption( "CPL_LOG", "C:\\cpl_errors.log" );
    CPLPushErrorHandler( CPLLoggingErrorHandler );

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    | President OSGeo, http://osgeo.org



More information about the FWTools mailing list