automake
[Top][All Lists]
Advanced

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

Re: Library locations


From: Braden McDaniel
Subject: Re: Library locations
Date: Sun, 05 Aug 2007 21:40:09 -0400

On Mon, 2007-08-06 at 10:53 +1000, Russell Shaw wrote:

[snip]

> However, the shared object that dlopen requires is in a new .libs
> directory:
> 
>    modules/System/.libs/system.o
>    modules/System/.libs/system.so
>    modules/System/.libs/system.so.0
>    modules/System/.libs/system.so.0.0.0
> 
> 
> 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.

> Also, what's the best way to determine from within the program whether
> it is currently installed or not?

I generally provide environment variables that can be set to search
paths or fully-qualified executables, as appropriate. If such
environment variables aren't set, I default to using programs/libraries
in their installed locations.

-- 
Braden McDaniel                           e-mail: <address@hidden>
<http://endoframe.com>                    Jabber: <address@hidden>






reply via email to

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