hi,<br />following is my code.<br />;<br />;<br />;<br />;<br />GDALDataset *poDataset;<p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">GDALAllRegister();</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">if( poDataset != NULL )</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">{</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">double adfGeoTransform[6];</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">qDebug()&lt;&lt;"Driver: "&lt;&lt;poDataset-&gt;GetDriver()-&gt;GetDescription()&lt;&lt;poDataset-&gt;GetDriver()-&gt;GetMetadataItem&nbsp;&nbsp; ( GDAL_DMD_LONGNAME );</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512"></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512"><br /><font color="#ff0000">// at this point error popup</font><br /><font color="#ff0000">qDebug()&lt;&lt;"Size is "&lt;&lt;poDataset-&gt;GetRasterXSize()&lt;&lt;poDataset-&gt;GetRasterYSize()&lt;&lt;poDataset-&gt;GetRasterCount();</font></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512"></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512"></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512"><br />if( poDataset-&gt;GetProjectionRef() != NULL )</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">qDebug()&lt;&lt;"Projection is `"&lt;&lt;poDataset-&gt;GetProjectionRef();</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">if( poDataset-&gt;GetGeoTransform( adfGeoTransform ) == CE_None )</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 768">{</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 768">qDebug()&lt;&lt;"Origin = "&lt;&lt;adfGeoTransform[0]&lt;&lt;adfGeoTransform[3];</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 768">qDebug()&lt;&lt; "Pixel Size = "&lt;&lt;adfGeoTransform[1]&lt;&lt;adfGeoTransform[5];</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 512">}</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0; -qt-user-state: 256">}<br />;<br />;<br />;<br />;<br /><br /><br />but the problame is resolve.<br />i builded this code with MinGW so as per Jürgen's conversation&nbsp;C++ api won't work from MinGW unless<br />GDAL is also built with MinGW.<br /><br />now i recoded with C-api and working fine.<br /><br />but now i have confusion about functionality of C-api and C++-api.<br />shell i continue with C-api or build GDAL library with MinGW and use C++-api?<br /><br /><br /><br />On Mon, 30 Mar 2009 15:34:18 +0200 Benoît Andrieu wrote<br /><br /><br /><br /><br /><br /><br /><br />Well...<br />&nbsp;<br />Have you checked your path to your include files <br />?<br />Could I see the part of the code where the errors <br />occured ?<br />&nbsp;<br />Thx<br />&nbsp;<br />Benoît Andrieubea@ixsea.combenoit.andrieu@gmail.com<br /><br />----- Original Message ----- <br />From: <br />Ajmeri <br />Iqbal <br />To: bea@ixsea.com <br />Cc: gdal-dev@lists.osgeo.org <br />Sent: Monday, March 30, 2009 3:22 <br />PM<br />Subject: Re :Re: Re :Re: Re :Re: <br />[gdal-dev] How to use GDAL Library<br />Hi,Thanks Benoît Andrieubea for your reply.you are <br />right, there is no&nbsp;need&nbsp;any cpp file. but when i build&nbsp;the <br />same&nbsp;code given in&nbsp;GDAL tutorial&nbsp;with QT Creator popups the <br />following error.g++ -enable-stdcall-fixup <br />-Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc <br />-Wl,-subsystem,console -mthreads -Wl -o debugImageRW.exe debug/main.o <br />-L"d:Qt2009.01qtlib" gdal_i.lib -lQtCored4<br />mingw32-make[1]: Leaving directory <br />`D:/QT_Projects/ImageRW'<br />mingw32-make: Leaving directory <br />`D:/QT_Projects/ImageRW'<br />debug/main.o: In function `main':<br />D:/QT_Projects/ImageRW/main.cpp:34: &nbsp; reference <br />to `GDALDataset::GetRasterCount()'<br />D:/QT_Projects/ImageRW/main.cpp:34: &nbsp; reference <br />to `GDALDataset::GetRasterYSize()'<br />D:/QT_Projects/ImageRW/main.cpp:34: &nbsp; reference <br />to `GDALDataset::GetRasterXSize()'<br />collect2: ld returned 1 exit status<br />mingw32-make[1]: *** [debugImageRW.exe] Error <br />1<br />mingw32-make: *** [debug] Error 2<br />Exited with code <br />2.but the same code i builded with VC++ <br />2005, its working fine.unfortunatly <br />i&nbsp;want&nbsp;to&nbsp;link GDAL library in QT.the bellow is my QT <br />.pro file settingQT -= gui<br />TARGET = <br />ImageRW<br />CONFIG += <br />console<br />CONFIG -= <br />app_bundle<br />TEMPLATE = <br />app<br />SOURCES += <br />main.cpp<br />LIBS += <br />gdal_i.libthanks in advance.On Mon, 30 Mar 2009 <br />14:42:07 +0200 Benoît Andrieu wroteHi <br />!&nbsp;You won't need any cpp files.Personally, I am using the <br />FWTools package which bundles dll, libs and headers <br />files.&nbsp;You just have to compile using gdal_priv.hThen link to <br />gdal_i.libThen provide with your&nbsp;runtime all the dlls which <br />gdal_fw.dll is depending to.You will find which dlls it is depending to by <br />using Dependency Walker <br />(http://www.dependencywalker.com/).&nbsp;Then your runtime will be <br />able to use all of the image formats drivers that GDAL was compiled to <br />support.&nbsp;I hope this will <br />help.&nbsp;Regards,&nbsp;Benoît <br />Andrieubea@ixsea.combenoit.andrieu@gmail.com----- Original Message <br />----- From: Ajmeri Iqbal To: bea@ixsea.com Cc: <br />gdal-dev@lists.osgeo.org Sent: Monday, March 30, 2009 11:06 <br />AMSubject: Re :Re: Re :Re: [gdal-dev] How to use GDAL <br />LibraryHi,Actually i m working on Generic image reading/writing and <br />display on viewer with all of its information, so i think i need all <br />listed library. but dont know how to use them in my code.i have <br />downloded gdal_i.lib, gdal.dll and its include .h files..h files contains <br />only the prototype function to link with library but i could not find its <br />.cpp file which may containt implementation function of that linking <br />function of .h files.can u please give me broad idea or step by step <br />procedure about how do i link these library to c++ code.thanks in <br />advanceRegards,IqbalOn Fri, 27 Mar 2009 18:54:01 +0100 Benoît Andrieu <br />wroteHi,&nbsp;I am using FWTools 2.2.9So I am releasing my softwares with <br />most of the dlls (you can use depends to find <br />which).&nbsp;The&nbsp;linking is done with <br />:gdal_i.libgeos_i.libgeotiff_i.liblibtiff_i.libproj_i.lib&nbsp;But yo <br />may want to use more or less libraries...&nbsp;Regards,&nbsp;Benoît <br />Andrieubea@ixsea.combenoit.andrieu@gmail.com----- Original Message <br />----- From: Ajmeri Iqbal To: bea@ixsea.com Cc: <br />gdal-dev@lists.osgeo.org Sent: Friday, March 27, 2009 3:11 PMSubject: <br />Re :Re: [gdal-dev] How to use GDAL LibraryHi Benoît Andrieu,Thanks for <br />reply.i already saw that tutorial,but the problame is how to and which <br />library to be linked using QT(most probably same way of C/C++).coz there <br />is a three library named gdal16.dll, gdal_i.lib and gdal.lib.On Fri, 27 <br />Mar 2009 11:33:42 +0100 Benoît Andrieu wroteHi,&nbsp;If you want to use <br />GDAL in C / C++, take a look at the tutorial at <br />http://www.gdal.org/gdal_tutorial.html.It is really straightforward, I <br />used this for the integration of GDAL in our modules and it worked <br />fine.&nbsp;Regards,&nbsp;Benoît <br />Andrieubea@ixsea.combenoit.andrieu@gmail.com----- Original Message <br />----- From: Ajmeri Iqbal To: gdal-dev@lists.osgeo.org Sent: Friday, <br />March 27, 2009 11:06 AMSubject: [gdal-dev] How to use GDAL LibraryDear <br />all,I want to use GDAL library in my project using QT.How could i use this <br />library for Reading and writing the Raster images (i.e. <br />JPEG,JPEG200,TIFF,GeoTiff,BMP,PNG,GIF, etc)please help me.Thanks in <br />advance_______________________________________________gdal-dev mailing <br />listgdal-dev@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/gdal-dev<br /><br /><br /><br /><br /><br /></p><br><Table border=0 Width=644 Height=57 cellspacing=0 cellpadding=0 style="font-family:Verdana;font-size:11px;line-height:15px;"><TR><td><A HREF="http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?" target="_blank"><IMG SRC="http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle"></A></td></TR></Table>