[Gdal-dev] hello, a question of static link proj4
Eric Dönges
Eric.Doenges at rcs.ei.tum.de
Tue Oct 12 10:48:18 EDT 2004
Frank Warmerdam wrote:
> perl.bj wrote:
>
>> hello, How do you static link proj4? I want to static link gdal, what
>> should i do?
>
>
> Perl.BJ,
>
> If you use the GDAL configure option "--with-static-proj" you can
> statically link PROJ.4 into the GDAL shared library instead of having it
> uses dynamic loading to find the PROJ shared library at run time. Now
> this
> still will generally mean that the PROJ shared library is used, but it
> will
> be done using normal shared library mechanisms rather than dynamic
> loading
> (using dlopen() and dlsym()). I am assuming you are interested in
> Linux/Unix
> since you didn't specify.
I'ld like to point out one more thing - when you configure gdal this
way, make sure
that you've already built libproj.a and that it can be linked with.
Otherwise, the gdal
configure script will (semi-)silently ignore your request to statically
link libproj.a.
In fact, make sure all required libraries are linkable, since having one
of them
not linkable during configure can cause the configure to fail in
mysterious ways
(well, mysterious until you read the config.log file that is).
With kind regards,
Eric
More information about the Gdal-dev
mailing list