Resolve shared libraries location at runtime ?

A

Apprentice

Hi there,
Is there a way in which I can specify at runtime to an application
the locations of shared dynamic libraries on which it depends? I do
not want to use LD_LIBRARY_PATH or other LD constructs.
My Shared libraries can be placed any place on the system by the end
user and I would like to use shared libraries from that location as
specified by user in a config file or as command line arguments .
I needed this, since I want my applications to be very portable
across platforms and install locations. Can I implement such a
functionality from outside my application i.e. do I need to add code
within my application to support such a scenario or does UNIX provide
me some means ?

My question is two-fold:
1. Can something that achieves this be built into my make build system?
2. How portable would such a solution be across the various UNIX
platforms ?

I would really appreciate all the help I can get on this. Thanks your
time..

Dhanvi
 
V

Victor Bazarov

Apprentice said:
Is there a way in which I can specify at runtime to an application
the locations of shared dynamic libraries on which it depends? I do
not want to use LD_LIBRARY_PATH or other LD constructs.
[..]

There is no such mechanism in C++ language. There is no even such
thing as "shared dynamic library" in C++. It's all specific to your
platform.

V
 
L

Larry I Smith

Apprentice said:
Hi there,
Is there a way in which I can specify at runtime to an application
the locations of shared dynamic libraries on which it depends? I do
not want to use LD_LIBRARY_PATH or other LD constructs.
My Shared libraries can be placed any place on the system by the end
user and I would like to use shared libraries from that location as
specified by user in a config file or as command line arguments .
I needed this, since I want my applications to be very portable
across platforms and install locations. Can I implement such a
functionality from outside my application i.e. do I need to add code
within my application to support such a scenario or does UNIX provide
me some means ?

My question is two-fold:
1. Can something that achieves this be built into my make build system?
No

2. How portable would such a solution be across the various UNIX
platforms ?

Not portable; Unix/Linux expect SO's to be in well known locations
(much like Windows).
I would really appreciate all the help I can get on this. Thanks your
time..

Dhanvi

Try posting to:

comp.os.linux.development.apps

Regards,
Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top