[gdal-dev] OGR: GetField methods problem

Anton Patrushev anton at orkney.co.jp
Tue Oct 21 02:44:39 EDT 2008


Hi Andrey,

Of course I'm linking GDAL :)
But I finally got it!
Somehow I was using different versions of gdal and gdal-dev packages
(gdal-dev was newer).

Cheers,
Anton.

On 10/21/08, Andrey Kiselev <dron at ak4719.spb.edu> wrote:
> Anton,
>
>
>  On Sat, Oct 18, 2008 at 11:45:49AM +0900, Anton Patrushev wrote:
>  > It is strange, but I have this problem again with the fresh
>  > installation of Ubuntu 8.04.
>  > I took GDAL 1.5.1 .deb packages from here
>  > http://les-ejk.cz/ubuntu/dists/hardy/multiverse/binary-i386/ and they
>  > look OK.
>  > But when I'm trying to compile my stuff, I get
>  >
>  > /usr/include/gdal/ogr_feature.h undefined reference to
>  > 'OGRFeature::GetFieldAsDouble(int)'
>  > /usr/include/gdal/ogr_feature.h undefined reference to
>  > 'OGRFeature::GetFieldAsInteger(int)'
>  > /usr/include/gdal/ogr_feature.h undefined reference to
>  > 'OGRFeatureDefn::GetFieldIndex(char const*)'
>  >
>  > just like with RHEL before.
>  > It looks pretty strange, 'cause I have all header files from gdal-dev.
>
>
> That means you forgot to link with the GDAL library. Try to add '-lgdal'
>  option to you compilation command line.
>
>  Best regards,
>  Andrey
>
>
>
>  --
>  Andrey V. Kiselev
>  ICQ# 26871517
>  _______________________________________________
>  gdal-dev mailing list
>  gdal-dev at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


More information about the gdal-dev mailing list