<div>Hi, that tutorial is quite old, and qgis has changed quite a bit since then...</div><div><br></div>most probably your gdal.h is not in the include search path. <div><br></div><div>Did you instal libgdal-dev with your package manager? </div>
<div><br></div><div>If not you need to set CPLUS_INCLUDE_PATH and possibly C_INCLUDE_PATH to the include dir where you installed gdal.</div><div><br></div><div>cheers</div><div>Etienne<br><div class="gmail_quote"><br></div>
<div class="gmail_quote">On Thu, Oct 11, 2012 at 1:19 AM, Justin Hubbard <span dir="ltr"><<a href="mailto:justin@pyrotechsoftware.com" target="_blank">justin@pyrotechsoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<div><br></div><div>I am running Ubuntu 12.04, and as mentioned I was able to build Qgis successfully.</div><div>It is when I attempt to use the Qgis libraries in a custom application built in Qt Creator, that I get the error. </div>
<div>My first thought was that I need to include the gdal library in my application as well, but that doesn't seem to work.</div><div><br></div><div>Any help would be appreciated</div><div><br></div><div>Thanks<div><div class="h5">
<br><br>
<div class="gmail_quote">On Wed, Oct 10, 2012 at 7:55 PM, Alex Mandel <span dir="ltr"><<a href="mailto:tech_dev@wildintellect.com" target="_blank">tech_dev@wildintellect.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 10/10/2012 06:42 AM, Justin Hubbard wrote:<br>
> Hi<br>
><br>
> I am brand new to the QGIS and Linux developer world.<br>
> I have built QGIS from source and all has gone well.<br>
><br>
> I have also been following Tim Sutton's tutorials on this development, and<br>
> while attempting to add a raster layer (tutorial<br>
</div>> 4<<a href="http://blog.qgis.org/node/94" target="_blank">http://blog.qgis.org/node/94</a>>)<br>
<div>> but am getting a strange error when compiling.<br>
> The qgsRasterLayer class<br>
> #include "gdal.h" which now gives me a file not found error.<br>
><br>
> I am sure that I am doing something wrong as I know that I have gdal 1.9.0<br>
> installed in the default path, and that the QGIS build found it without<br>
> problems.<br>
> Could someone please point me in the right direction.<br>
<br>
<br>
</div>What version of linux are you on?<br>
<br>
In order to compile you need to have the -dev version of various<br>
packages (aka the source code of those packages). So you're probably<br>
missing libgdal-dev<br>
<br>
On Debian/Ubuntu the following will auto install what's needed for you:<br>
sudo apt-get build-dep qgis<br>
<br>
Though I thought the build would fail if you were missing those.<br>
<br>
Enjoy,<br>
Alex<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><p><span style="font-family:verdana,geneva;font-size:x-small">Warm regards</span><br><strong><span style="font-family:verdana,geneva;font-size:x-small">Justin Hubbard</span></strong><br>
<br><strong><span style="font-family:verdana,geneva;font-size:x-small">--</span></strong><br></p><table border="0" cellspacing="1" cellpadding="0" style="background-color:rgb(0,51,102);width:250px;min-height:217px"><tbody><tr>
<td style="margin:0px;padding:1.5pt;font-family:arial,sans-serif;background-color:white"><table border="0" cellpadding="0" style="background-color:white;width:241px;min-height:207px"><tbody><tr><td colspan="2" style="margin:0px;padding:0.75pt">
<table border="0" cellspacing="0" cellpadding="0" style="width:347px;min-height:212px"><tbody><tr style="min-height:10.5pt"><td width="14" valign="top" style="margin:0px;padding:0in;min-height:10.5pt;width:10.5pt"> </td>
<td style="margin:0px;padding:0in;min-height:10.5pt">
<p dir="ltr" style="margin:0px;text-align:justify"> </p></td><td style="margin:0px;padding:0in;min-height:10.5pt"> <p dir="ltr" style="margin:0px;text-align:justify"><span style="font-family:verdana,geneva"><strong><span style="font-size:10pt;color:red">Justin Hubbard</span></strong></span></p>
<p dir="ltr" style="margin:0px;text-align:justify"><span style="font-size:7.5pt;color:rgb(0,51,102)">Software Engineer and Support<br><br></span></p></td></tr><tr style="min-height:10.5pt"><td width="14" valign="top" style="margin:0px;padding:0in;min-height:10.5pt;width:10.5pt">
<p style="margin:0px"> </p></td><td style="margin:0px;padding:0in;min-height:10.5pt"><p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:rgb(0,51,102)"> Mobile:</span></p></td><td style="margin:0px;padding:0in;min-height:10.5pt">
<p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:rgb(0,51,102)"> <a href="tel:%2B27%20%280%2979%20827%201657" value="+27798271657" target="_blank">+27 (0)79 827 1657</a></span></p></td></tr><tr style="min-height:10.5pt">
<td width="14" valign="top" style="margin:0px;padding:0in;min-height:10.5pt;width:10.5pt">
<p style="margin:0px"> </p></td><td style="margin:0px;padding:0in;min-height:10.5pt"><p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:rgb(0,51,102)"> Fax:</span></p></td><td style="margin:0px;padding:0in;min-height:10.5pt">
<p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:rgb(0,51,102)"> <a href="tel:%2B27%20%280%2986%20540%206016" value="+27865406016" target="_blank">+27 (0)86 540 6016</a></span></p></td></tr><tr style="min-height:10.5pt">
<td width="14" valign="top" style="margin:0px;padding:0in;min-height:10.5pt;width:10.5pt">
<p style="margin:0px"> </p></td><td style="margin:0px;padding:0in;min-height:10.5pt"><p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:rgb(0,51,102)"> Email:</span></p></td><td style="margin:0px;padding:0in;min-height:10.5pt">
<p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:navy"> <span style="color:blue"><span style="color:rgb(0,0,204)"><a title="Email Me" href="mailto:robert@plannermunicipalsoftware.co.za" target="_blank">justin@pyrotechsoftware.com</a></span></span></span></p>
</td></tr><tr style="min-height:10.5pt"><td width="14" valign="top" style="margin:0px;padding:0in;min-height:10.5pt;width:10.5pt"><p style="margin:0px"> </p></td><td style="margin:0px;padding:0in;min-height:10.5pt"><p style="margin:0px;line-height:10.5pt">
<span style="font-size:7.5pt;color:rgb(0,51,102)"> Web Site:</span></p></td><td style="margin:0px;padding:0in;min-height:10.5pt"><p style="margin:0px;line-height:10.5pt"><span style="font-size:7.5pt;color:navy"> <span style="color:blue"><span style="color:rgb(0,0,204)"><a title="About Me" href="http://www.plannermunicipalsoftware.co.za/" target="_blank">www.pyrotechsoftware.co</a>m</span></span></span></p>
</td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br>
</div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br></blockquote></div><br></div>