[Gdal-dev] RE: Reading/Writing via GDAL library

t chheng tcchheng at ucsd.edu
Mon Apr 23 13:36:24 EDT 2007


Thanks, that does work.

I'm curious, why doesn't the compile options i've tried work? Why do i have
to use the libgdal.a rather than the produced gdal14.dll file?

> 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"

Tommy


Norman Vine wrote:
> 
> 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
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
> 
> 

-- 
View this message in context: http://www.nabble.com/Reading-Writing-via-GDAL-library-tf3620307.html#a10145189
Sent from the GDAL - Dev mailing list archive at Nabble.com.




More information about the Gdal-dev mailing list