<DIV>I am sorry for that I can not take a test in VC++ 2005, because I built every essential dll in VC++ 2008, and I now only install VC2008 on my computer. Will it take any different results if dlls built with different compiler ? </DIV>
<DIV>I simply have a check in local : One with pre-built dlls from HDFGroup ,such as zlib, szip, jpeg . And the other with all dlls built from source.</DIV>
<DIV>
<DIV>But When reading a hdf5 file, they all gave me a report about Stack Overflow. </DIV>
<DIV>The HDF5 file is a sample data contained in hdfview which provided by HDFGroup and can be found in its website.</DIV>
<DIV>And the code I write is below:</DIV></DIV>
<DIV>//////////////////////////////////////////////////////////////////////////////////////<BR>#include <iostream><BR>using namespace std;</DIV>
<DIV>#include "gdal_priv.h"<BR>#pragma comment(lib,"gdal_i.lib")</DIV>
<DIV>int main()<BR>{ </DIV>
<DIV> GDALAllRegister();</DIV>
<DIV> char* filename="D:\\Documents and Settings\\Visual Studio 2008\\Projects\\GdalConsole\\Debug\\hdf5_test.h5";</DIV>
<DIV> char *pszFormat="HDF5";<BR> GDALDriver *poDriver = GetGDALDriverManager()->GetDriverByName(pszFormat); </DIV>
<DIV>////////////// here poDriver is non-null pointer////////////<BR> if( poDriver != NULL )<BR> {<BR> ........................<BR> }<BR> else<BR> {<BR> cout<<"Gdal do not support HDF4!"<<endl;<BR> } <BR> GDALDataset *poDataset;<BR> poDataset= (GDALDataset *) GDALOpen( filename, GA_ReadOnly);</DIV>
<DIV>/////////////////when code run here, it reports that stack overflow</DIV>
<DIV> if(poDataset == NULL)<BR> {<BR> cout<<"error!";<BR> return 0;<BR> }<BR> else<BR> {<BR> ...................<BR> } <BR> poDataset=NULL;<BR> return 0;<BR>}</DIV>
<DIV>/////////////////////////////////////////////////////////////////////////////</DIV>
<DIV><BR> </DIV>
<DIV></DIV><BR>在2009-08-08 00:45:37,"Chaitanya kumar CH" <chaitanya.ch@gmail.com> 写道:<BR>
<BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">atubar,<BR><BR>If you can try this with VC++2005, please do. In any case please tell the result here.<BR><BR>If you can, provide a sample data that gives this error so that the situation to be understood better.<BR><BR>
<DIV class="gmail_quote">2009/8/6 atubar <SPAN dir="ltr"><<A href="mailto:atubar@126.com">atubar@126.com</A>></SPAN><BR>
<BLOCKQUOTE class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>Hello, I am a freshman in working with Gdal and HDF5 in Visual C++ 2008. I have built essential dlls as those guides said. And I got gdal16.dll, hdf5dll.dll and more.</DIV>
<DIV>I set up a project , add include and lib to this project. Then I copy some sample codes to test how gdal and hdf5 works.</DIV>
<DIV>These codes below works successfully:</DIV>
<DIV> char *pszFormat="HDF5";<BR> GDALDriver *poDriver = GetGDALDriverManager()->GetDriverByName(pszFormat);</DIV>
<DIV>It returns an non null poDriver.</DIV>
<DIV>But when I work with these codes below: </DIV>
<DIV> char* filename="..\\hdf5_test.h5";<BR> GDALDataset *poDataset;<BR> poDataset= (GDALDataset *) GDALOpen( filename, GA_ReadOnly);</DIV>
<DIV>it occurs an error like this below:</DIV>
<DIV> Unhandled exception in **.exe:0xC00000FD:Stack Overflow </DIV>
<DIV>How it comes? Is it a bug?What should I do ?</DIV><BR><BR><SPAN title="neteasefooter">
<HR>
<A href="http://www.yeah.net/?from=footer" target="_blank">没有广告的终身免费邮箱,www.yeah.net</A> </SPAN><BR>_______________________________________________<BR>gdal-dev mailing list<BR><A href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</A><BR><A href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</A><BR></BLOCKQUOTE></DIV><BR><BR>-- <BR>Best regards,<BR>Chaitanya kumar CH.<BR></BLOCKQUOTE><br><!-- footer --><br><span title="neteasefooter"/><hr/>
<a href="http://www.yeah.net/?from=footer">没有广告的终身免费邮箱,www.yeah.net</a>
</span>