[Qgis-developer] QGis 1.9 gdal.h not found

Etienne Tourigny etourigny.dev at gmail.com
Thu Oct 11 08:03:00 PDT 2012


Hi, that tutorial is quite old, and qgis has changed quite a bit since
then...

most probably your gdal.h is not in the include search path.

Did you instal libgdal-dev with your package manager?

If not you need to set CPLUS_INCLUDE_PATH and possibly C_INCLUDE_PATH to
the include dir where you installed gdal.

cheers
Etienne

On Thu, Oct 11, 2012 at 1:19 AM, Justin Hubbard <justin at pyrotechsoftware.com
> wrote:

> Hi
>
> I am running Ubuntu 12.04, and as mentioned I was able to build Qgis
> successfully.
> It is when I attempt to use the Qgis libraries in a custom application
> built in Qt Creator, that I get the error.
> My first thought was that I need to include the gdal library in my
> application as well, but that doesn't seem to work.
>
> Any help would be appreciated
>
> Thanks
>
>
> On Wed, Oct 10, 2012 at 7:55 PM, Alex Mandel <tech_dev at wildintellect.com>wrote:
>
>> On 10/10/2012 06:42 AM, Justin Hubbard wrote:
>> > Hi
>> >
>> > I am brand new to the QGIS and Linux developer world.
>> > I have built QGIS from source and all has gone well.
>> >
>> > I have also been following Tim Sutton's tutorials on this development,
>> and
>> > while attempting to add a raster layer (tutorial
>> > 4<http://blog.qgis.org/node/94>)
>> > but am getting a strange error when compiling.
>> > The qgsRasterLayer class
>> > #include "gdal.h" which now gives me a file not found error.
>> >
>> > I am sure that I am doing something wrong as I know that I have gdal
>> 1.9.0
>> > installed in the default path, and that the QGIS build found it without
>> > problems.
>> > Could someone please point me in the right direction.
>>
>>
>> What version of linux are you on?
>>
>> In order to compile you need to have the -dev version of various
>> packages (aka the source code of those packages). So you're probably
>> missing libgdal-dev
>>
>> On Debian/Ubuntu the following will auto install what's needed for you:
>> sudo apt-get build-dep qgis
>>
>> Though I thought the build would fail if you were missing those.
>>
>> Enjoy,
>> Alex
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
>
> --
>
> Warm regards
> *Justin Hubbard*
>
> *--*
>
>
>
>
>
> *Justin Hubbard*
>
> Software Engineer and Support
>
>
>
>   Mobile:
>
>   +27 (0)79 827 1657
>
>
>
>   Fax:
>
>   +27 (0)86 540 6016
>
>
>
>   Email:
>
>   justin at pyrotechsoftware.com <robert at plannermunicipalsoftware.co.za>
>
>
>
>   Web Site:
>
>   www.pyrotechsoftware.co <http://www.plannermunicipalsoftware.co.za/>m
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121011/280ddba3/attachment-0001.html>


More information about the Qgis-developer mailing list