[gdal-dev] Linking proj statically/dynamically

Andrew Bell andrew.bell.ia at gmail.com
Fri Nov 2 13:32:29 PDT 2018


Hi,

I'm trying to figure out what might be going on with setting things up for
proj with GDAL.  If I set
--with-proj=/directory/to/where/proj/is/installed, I end up with
PROJ_STATIC set to true, even though I have no static proj library built (I
only have libproj.so, no libproj.a in the install directory).  Looking at
configure.ac, I'm not seeing anything that would explicitly check for a
static library at all, just a bunch of checks for a proj library of various
incarnations in various directories relative to the one I set in
--with-proj.

At the conclusion of configuration, GDALmake.opt sets LIBS includes the
proper information to link:

LIBS = ... -L/directory/to/where/proj/is/installed/lib -lproj ...

But no rpath is entered to support locating the proj library when linking
another project with GDAL, which means that I get errors at link time
asking for me to add --rpath-link to my link line.

What, exactly, is --with-proj supposed to do and how does it interact with
static linking of proj, assuming I have libproj.a somewhere?

Thanks,

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181102/a9a19104/attachment.html>


More information about the gdal-dev mailing list