[GRASS5] gdal-config --dep-libs

Frank Warmerdam warmerdam at pobox.com
Fri Nov 12 13:44:25 EST 2004

Radim Blazek wrote:
> Should be `gdal-config --dep-libs` also added to GDAL_LIBS?
> How is it possible that GRASS compiles without GDAL dep-libs?


gdal-config --dep-libs is a list of libraries that GDAL depends on.
If you were to link against the GDAL static library you would need
to also link against the dependent libs. However, the shared library
already holds the dependencies on these other libraries (or has statically
linked them in as appropriate) so you shouldn't normally need anything
but the -lgdal for dynamic linking.

Note, this holds true for Linux.  There may be other platforms where shared
libraries don't keep track of their dependencies.  I'm not sure.

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 grass-dev mailing list