[Top][All Lists]

[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:


> However, the shared object that dlopen requires is in a new .libs
> directory:
>    modules/System/.libs/system.o
>    modules/System/.libs/
>    modules/System/.libs/
>    modules/System/.libs/
> Dlopen fails because it is looking for modules/System/
> When installed, i'll have the install location at:
>    /usr/lib/$(pkglibdir)/System/
> Should i just have dlopen look for modules/System/.libs/
> and modules/System/ 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

> 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>
<>                    Jabber: <address@hidden>

reply via email to

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