471,599 Members | 986 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Resolve shared libraries location at runtime ?

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

Mar 27 '06 #1
2 1740
Apprentice wrote:
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
--
Please remove capital As from my address when replying by mail
Mar 28 '06 #2
Apprentice wrote:
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
Mar 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Cider123 | last post: by
7 posts views Thread by Steve | last post: by
1 post views Thread by vsp15584 | last post: by
5 posts views Thread by David T. Ashley | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.