[gdal-dev] Stack Overflow in gdal with HDF5 using VC2008

Mateusz Loskot mateusz at loskot.net
Thu Aug 13 21:27:46 EDT 2009


atubar wrote:
> Today, I find a computer with VS2005 installed on it. And I build
> gdal 1.6.1 with pre-built dlls supplied as package named
> win42r4-VS2005-IVF101, hdf5_183_xp32_vs2005_ivf91 from HDFGroup
> website. While building, warnings can be ignored, and no error
> occurs.
> 
> I copy dlls such as gdal16.dll, hd424m.dll, hm424m.dll, hdf5dll.dll,
> szlibdll.dll(from szip21-vs2005-enc), zlib1.dll(from zlib123-vs2005)
> into the project folder.  And add include and lib of gdal built
> results to the project.
> 
> Then I modify the program as what you said. The modified code is
> listed below:
> 
> //------------------------------------// #include <iostream>
> 
> #include "gdal_priv.h" #pragma comment(lib,"gdal_i.lib")
> 
> using namespace std;
> 
> int main() { GDALAllRegister();
> 
> const char* filename="D:\\RSI\\IDL63\\examples\\data\\africavlc.png";
> 
> 
> const char* pszFormat="HDF5"; GDALDriver *poDriver =
> GetGDALDriverManager()->GetDriverByName(pszFormat);
> 
> if( poDriver != NULL ) { ////........................ ////THe program
> can run here. } else { cout<<"Gdal do not support HDF5!"<<endl;
> 
> } GDALDataset *poDataset;
> 
> poDataset= (GDALDataset *) GDALOpen( filename, GA_ReadOnly); //The
> program reports an error like this. //Unhandled exception in
> **.exe:0xC00000FD:Stack Overflow //Then the compiler ask me wether to
> Break up the program.

The only thing I can suggest is to play with debugger and try to identiy
where the problem comes from. I can't see any shortcut.

BTW, ensure you don't have any old files (headers or binaries) of
previous versions of GDAL or HDF dangling around.
IOW, ensure the dev environment is clean.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the gdal-dev mailing list