<P>Today, I find a computer with VS2005 installed on it. And I build&nbsp; 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)&nbsp; into the project folder.&nbsp; 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 &lt;iostream&gt;</P>
<P>#include "gdal_priv.h"<BR>#pragma comment(lib,"gdal_i.lib")</P>
<P>using namespace std;</P>
<P>int main()<BR>{<BR>&nbsp;GDALAllRegister();<BR>&nbsp;<BR>&nbsp;const char* filename="D:\\RSI\\IDL63\\examples\\data\\africavlc.png";<BR>&nbsp;<BR>&nbsp;const char* pszFormat="HDF5";<BR>&nbsp;GDALDriver *poDriver = GetGDALDriverManager()-&gt;GetDriverByName(pszFormat);<BR>&nbsp;<BR>&nbsp;if( poDriver != NULL )<BR>&nbsp;{<BR>&nbsp;&nbsp;////........................<BR>&nbsp;&nbsp;////THe program can run here.<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;cout&lt;&lt;"Gdal do not support HDF5!"&lt;&lt;endl;</P>
<P>&nbsp;}<BR>&nbsp;GDALDataset *poDataset;<BR>&nbsp;<BR>&nbsp;poDataset= (GDALDataset *) GDALOpen( filename, GA_ReadOnly);<BR>&nbsp;//The program reports an error like this.<BR>&nbsp;//Unhandled exception in **.exe:0xC00000FD:Stack Overflow<BR>&nbsp;//Then the compiler ask me wether to Break up the program.<BR>&nbsp;<BR>&nbsp;if(poDataset == NULL)<BR>&nbsp;{<BR>&nbsp;&nbsp;cout&lt;&lt;"error!";<BR>&nbsp;&nbsp;return 0;<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;//...................<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;GDALClose(poDataset);<BR>&nbsp;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>