Hi,<br /><br />Thanks Benoît Andrieubea for your reply.<br />you are right, there is no&nbsp;need&nbsp;any cpp file. but when i build&nbsp;the same&nbsp;code given in&nbsp;GDAL tutorial&nbsp;with QT Creator popups the following error.<br /><br /><span style="COLOR: #ff0000">g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debugImageRW.exe debug/main.o -L"d:Qt2009.01qtlib" gdal_i.lib -lQtCored4</span><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">mingw32-make[1]: Leaving directory `D:/QT_Projects/ImageRW'</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">mingw32-make: Leaving directory `D:/QT_Projects/ImageRW'</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">debug/main.o: In function `main':</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">D:/QT_Projects/ImageRW/main.cpp:34: undefined reference to `GDALDataset::GetRasterCount()'</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">D:/QT_Projects/ImageRW/main.cpp:34: undefined reference to `GDALDataset::GetRasterYSize()'</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">D:/QT_Projects/ImageRW/main.cpp:34: undefined reference to `GDALDataset::GetRasterXSize()'</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">collect2: ld returned 1 exit status</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">mingw32-make[1]: *** [debugImageRW.exe] Error 1</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="COLOR: #ff0000">mingw32-make: *** [debug] Error 2</span></p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0"><span style="FONT-WEIGHT: 600; COLOR: #ff0000">Exited with code 2.<br /><br /></span><br /><font color="#000000">but the same code i builded with VC++ 2005, its working fine.<br /></font><br />unfortunatly i&nbsp;want&nbsp;to&nbsp;link GDAL library in QT.<br /><br />the bellow is my QT .pro file setting<br /><br />QT -= gui</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">TARGET = ImageRW</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">CONFIG += console</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">CONFIG -= app_bundle</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">TEMPLATE = app</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">SOURCES += main.cpp</p><p style="MARGIN: 0px; TEXT-INDENT: 0px; -qt-block-indent: 0">LIBS += gdal_i.lib<br /><br />thanks in advance.<br /><br /><br /><br />On Mon, 30 Mar 2009 14:42:07 +0200 Benoît Andrieu wrote<br /><br /><br /><br /><br /><br /><br /><br />Hi !<br />&nbsp;<br />You won't need any cpp files.<br />Personally, I am using the FWTools package which <br />bundles dll, libs and headers files.<br />&nbsp;<br />You just have to compile using gdal_priv.h<br />Then link to gdal_i.lib<br />Then provide with your&nbsp;runtime all the dlls <br />which gdal_fw.dll is depending to.<br />You will find which dlls it is depending to by <br />using Dependency Walker (http://www.dependencywalker.com/).<br />&nbsp;<br />Then your runtime will be able to use all of the <br />image formats drivers that GDAL was compiled to support.<br />&nbsp;<br />I hope this will help.<br />&nbsp;<br />Regards,<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 11:06 <br />AM<br />Subject: Re :Re: Re :Re: [gdal-dev] How <br />to use GDAL Library<br /><br />Hi,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 listed <br />library. but dont know how to use them in my code.<br />i have downloded gdal_i.lib, gdal.dll and its include .h files..h files <br />contains only the prototype function to link with library but i could not find <br />its .cpp file which may containt implementation function of that linking <br />function of .h files.<br />can u please give me broad idea or step by step procedure about how do i <br />link these library to c++ code.<br />thanks in advanceRegards,IqbalOn Fri, 27 Mar 2009 18:54:01 <br />+0100 Benoît Andrieu wroteHi,&nbsp;I <br />am using FWTools 2.2.9So I am releasing my softwares with most of the <br />dlls (you can use depends to find which).&nbsp;The&nbsp;linking is <br />done with <br />:gdal_i.libgeos_i.libgeotiff_i.liblibtiff_i.libproj_i.lib&nbsp;But <br />yo may want to use more or less <br />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 <br />PMSubject: Re :Re: [gdal-dev] How to use GDAL LibraryHi Benoît <br />Andrieu,Thanks for reply.i already saw that tutorial,but the problame is <br />how to and which library to be linked using QT(most probably same way of <br />C/C++).coz there is a three library named gdal16.dll, gdal_i.lib and <br />gdal.lib.On Fri, 27 Mar 2009 11:33:42 +0100 Benoît Andrieu <br />wroteHi,&nbsp;If you want to use GDAL in C / C++, take a look at the <br />tutorial at http://www.gdal.org/gdal_tutorial.html.It is really <br />straightforward, I used this for the integration of GDAL in our modules <br />and it worked 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>