<P>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.</P>
<P>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.</P>
<P>Then I modify the program as what you said. The modified code is listed below:</P>
<P>//------------------------------------//<BR>#include <iostream></P>
<P>#include "gdal_priv.h"<BR>#pragma comment(lib,"gdal_i.lib")</P>
<P>using namespace std;</P>
<P>int main()<BR>{<BR> GDALAllRegister();<BR> <BR> const char* filename="D:\\RSI\\IDL63\\examples\\data\\africavlc.png";<BR> <BR> const char* pszFormat="HDF5";<BR> GDALDriver *poDriver = GetGDALDriverManager()->GetDriverByName(pszFormat);<BR> <BR> if( poDriver != NULL )<BR> {<BR> ////........................<BR> ////THe program can run here.<BR> }<BR> else<BR> {<BR> cout<<"Gdal do not support HDF5!"<<endl;</P>
<P> }<BR> GDALDataset *poDataset;<BR> <BR> poDataset= (GDALDataset *) GDALOpen( filename, GA_ReadOnly);<BR> //The program reports an error like this.<BR> //Unhandled exception in **.exe:0xC00000FD:Stack Overflow<BR> //Then the compiler ask me wether to Break up the program.<BR> <BR> if(poDataset == NULL)<BR> {<BR> cout<<"error!";<BR> return 0;<BR> }<BR> else<BR> {<BR> //...................<BR> }<BR> <BR> GDALClose(poDataset);<BR> return 0;<BR>}<BR>//---------------------------------------------// </P>
<P>Is there any detail that you need?<BR></P><br><br><span title="neteasefooter"/><hr/>
<a href="http://www.yeah.net/?from=footer">没有广告的终身免费邮箱,www.yeah.net</a>
</span>