[Gdal-dev] Reading/Writing via GDAL library

Norman Vine nhv at cape.com
Sun Apr 22 02:19:33 EDT 2007


Tommy Chheng writes:AL library
> 
> I will be using the GDAL in conjunction with OSSIM, but for 
> this error, I commented out the OSSIM-specific code and just 
> ran the tutorial code.
> 
> This is one of the errors that I'm encountering
> :C:/ossimcvs/ossimConsole/ship_detect.cpp:(.text+0x22): 
> undefined reference to `OGRSFDriverRegistrar::Open(char 
> const*, int, OGRSFDriver**)'
> 
> I have gdal14.dll and I tried linking it using:
> -L/c/ossimcvs/gdal-1.4.0/lib -lgdal
> -L/c/ossimcvs/gdal-1.4.0/lib -lgdal14
> -L/c/ossimcvs/gdal-1.4.0/lib -l"gdal14.dll"
> 
> All with the same error.  Any ideas why it isn't linking correctly?


Tommy

Using the last example on http://www.gdal.org/ogr/ogr_apitut.html

The following commandline works for me with MingW in a MSYS shell

c++ `gdal-config --cflags` ogr_examp.c++ `gdal-config --libs` -o
org_examp.exe

Note the back ticks 

HTH

Norman




More information about the Gdal-dev mailing list