[Shapelib] Can't link to shapelib

Frank Warmerdam fwarmerdam at gmail.com
Fri Feb 18 13:13:51 PST 2005


On Fri, 18 Feb 2005 14:24:57 -0500 (EST), Yasir Malik
<ymalik at cs.stevens-tech.edu> wrote:
> > Either add /tmp/shapelib-1.2.10/.libs to your LD_LIBRARY_PATH or
> > add it through ldconfig.
> >
> 
> Frank,
> Ok, that works, but is there a better solution?  Shouldn't what I was
> doing earlier work?

Yasir, 

No, it should not have.  You successfully linked against the
shared library but at runtime programs need to know where to
look for the shared library file.  That is what LD_LIBRARY_PATH
and ldconfig are for. 

There are options to embed a runpath in shared libraries so that
programs that link against them will know where to look for them.
But I find that dangerous, and in any event it wouldn't have 
worked since you didn't install the files in the normal location. 

> Also, does the shapelib DLL work with Windows binaries created with MinGW?

I don't use MinGW but I don't see any reason it shouldn't.

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 Shapelib mailing list