[Gdal-dev] 1.2.0a Release
Alessandro Amici
alexamici at fastwebnet.it
Sat Feb 21 11:09:40 EST 2004
Frank,
On Saturday 21 February 2004 16:18, Frank Warmerdam wrote:
> > i added a --dep-libs option to gdal-config:
> > $ gdal-config --dep-libs
> > -lodbc -lxerces-c -lmfhdf -ldf -lgif -ljpeg -lpng -lnetcdf -lcfitsio -lz
> > -lpthread -lm -ldl -L/usr/lib -lpq
>
> If there are libraries other than GDAL itself that you need to link against
> when you link against GDAL, those should be included in the output of
> gdal-config --libs. Could you update accordingly?
the dependency libraries are _only_ useful if you link against the static
version of gdal, i.e. libgdal.a. they are _not_ needed in the normal case
when you link against gdal as a shared library (at least on linux).
so normal apps should use --libs:
$ gcc my-app.c `gdal-config --libs`
and apps statically linked should use both --libs ad --dep-libs:
$ gcc -static my-app.c `gdal-config --libs` `gdal-config --dep-libs`
or
$ gcc my-app.c /path/to/libgdal.a `gdal-config --dep-libs`
i think the two options should remain separate to keep the normal case of
dynamic link less confusing. furthermore a user usually knows if he is going
to link gdal statically and he can act acordingly.
just my two cents, if you are still of the opinion that the options should be
merged i'll merge them.
cheers,
alessandro
More information about the Gdal-dev
mailing list