automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library locations


From: Ralf Wildenhues
Subject: Re: Library locations
Date: Mon, 6 Aug 2007 08:38:55 +0200
User-agent: Mutt/1.5.16 (2007-07-16)

* Braden McDaniel wrote on Mon, Aug 06, 2007 at 03:40:09AM CEST:
> On Mon, 2007-08-06 at 10:53 +1000, Russell Shaw wrote:
> 
> > However, the shared object that dlopen requires is in a new .libs
> > directory:
[...]
> >    modules/System/.libs/system.so
[...]
> > Dlopen fails because it is looking for modules/System/system.so
> > When installed, i'll have the install location at:
> > 
> >    /usr/lib/$(pkglibdir)/System/system.so
> > 
> > Should i just have dlopen look for modules/System/.libs/system.so
> > and modules/System/system.so and use the first one that succeeds, or
> > is there a cleaner way for avoiding this?
> 
> You can use libltdl's ltdlopen instead. libltdl is included with
> libtool.

The answer isn't wrong, but the answer isn't hitting the nail fully on
the head either.

One way to dlopen uninstalled modules is to
  libtool --mode=execute -dlopen modules/System/system.la program [ARGS...]

which should set LD_LIBRARY_PATH (or the appropriate variable on the
system) to contain modules/System/.libs to find system.so.  You may want
to refer to `libtool' as `$(LIBTOOL)' in Makefile.am (or even add
`$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS)' for user benefit).

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]