[Top][All Lists]

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

Re: Probleme while loading libtool library

From: Peter O'Gorman
Subject: Re: Probleme while loading libtool library
Date: Wed, 13 Jun 2007 08:43:56 -0700

On Jun 13, 2007, at 2:58 AM, Laurent Marzullo wrote:


I'm currently writing a program which load (with lt_dlopen) a libtool library
called ''.

This last library required '' which is an Oracle 10i library.

I've got an XML file where some attribute specify some additionnal path to add

I've then set this attribute to
1) The path where is located ''
2) The path where is located ''

In my c++ program, I then use 'setenv' to modify LD_LIBRARY_PATH with the 2 path above (Before doing the setenv, the LD_LIBRARY_PATH does not countain any of the
directory above).

If I do:

std::cerr << "LD_LIBRARY_PATH = " << getenv( "LD_LIBRARY_PATH" ) << '\n'

The dynamic linker tends to look at the environment variables at application startup only. Setting LD_LIBRARY_PATH in your application will have no effect on dlopen() until you exec() something.

People often write wrapper scripts that do nothing but set LD_LIBRARY_PATH (and their equivalents on other platforms) before execing the program, another alternative, would be to locate the library yourself, and pass lt_dlopen() the full path.

Lastly, there exists a libltdl specific search var, LTDL_LIBRARY_PATH, if you set this and explicitly lt_dlopen() both libraries in the right order i.e. lt_dlopen("") then lt_dlopen("") should work.

Hope this helps,
Peter O'Gorman

reply via email to

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