[gdal-dev] Re: Access gdal14.dll in VC++ 6.0

Frank Warmerdam warmerdam at pobox.com
Tue Dec 18 09:42:10 EST 2007


kiruba nantham wrote:
> Hai Frank,
>      I am kiruba, I just want to know whether we can use gdal14.dll for 
> visual c++ 6.0. Accually i am able to read the layer counts(19) for this 
> chart (US1BS04M.000) using borland builder compiler. When i dump this 
> chart using command line tool i got same layer count(19), but when i am 
> opening this chart (US1BS04M.000) with visual c++ 6.0 i am getting layer 
> count as 5. if i continue to draw my chart with this, i am getting 
> unhandled exception error. The following code i am using to get layer count.
>          OGRDataSourceH  m_pDS;
>          OGRSFDriverH m_pDriver;
>          int drivercount  = OGRGetDriverCount();
>          m_pDS = OGROpen("US1BS04M.000",0,&m_pDriver);
>          int LayerCount = OGR_DS_GetLayerCount(m_pDS);
>      i am getting same divercount(16) in both(borland,VC++). but 
> LayerCount i am getting 19 in borland, 5 in VC++. i attached this chart 
> for your referance chart (zipped) size is 45kb. can you please tell me 
> how to handle this.

Kiruba,

If you only get 5 layers with VC6 then it likely means the search for
the s57*.csv support files failed.  This could be because you did something
differently (ie. file location or environment variable settings) or it
could be something flawed in the file access when built with VC6.

You might want to add some printf()'s or otherwise debug into and below
S57ClassRegistrar::FindFile() in s57classregistrar.cpp.

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 gdal-dev mailing list