[Gdal-dev] Static gdal

Frank Warmerdam warmerdam at pobox.com
Wed Apr 30 00:47:50 EDT 2003


Jay Baird wrote:
> when including gdal as a static lib, what all needs to be included in the
> compilation? 
> 
> I have libgdal.a, libogr.a, cpl.a, and libproj.a, and the headers:
> gdal.h 
> gdal_priv.h 
> gdal_frmts.h 
> 
> an when compiling I get the following:
> ld: Undefined symbols:
> _GDALAllRegister 
> _GDALClose 
> _GDALOpen 
> GDALDataset::GetRasterCount()
> GDALDataset::GetRasterXSize()
> GDALDataset::GetRasterYSize()
> 
> so is there anything specific i'm missing in my includes and libraries?

Jay,

For whatever reason it would appear that nothing is working right.  If
you are including libgdal.a you should be getting all of these.
Depending on how you build you will also like need
gdal/ogr/ogrsf_frmts/ogrsf_frmts.a, but that doesn't explain the problem.

However, in my opinion it is a bad idea to try and statically link GDAL.
Any particular reason you are trying to?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list