[Top][All Lists]

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

Re: Adding the right flags to a program which dlopens

From: Bob Friesenhahn
Subject: Re: Adding the right flags to a program which dlopens
Date: Wed, 2 Jun 2004 08:59:33 -0500 (CDT)

On Wed, 2 Jun 2004, Stephane Bortzmeyer wrote:

On Wed, Jun 02, 2004 at 08:45:35AM -0500,
Bob Friesenhahn <address@hidden> wrote
a message of 31 lines which said:

If you are willing to build and link your loadable modules using
libtool, then it as simple as linking using libtool's -module

The problem is not the building of the modules, it is the building of
the main program, the one which includes calls to dlopen(3). If I do
nothing special, the program does not link on Debian/Linux: undefined
symbol dlopen.

If you use libltdl to do module loading rather than raw dlopen() then the necessary libraries will be applied automatically since libltdl's library dependencies will automatically be applied. Otherwise you will need to discover these libraries for yourself using configure, or steal them from the libtool/libltdl configuration.

For linking programs, I add -export-dynamic to the libtool link options since our modules share a common library (which is also used by the program) and need access to its symbols.

Bob Friesenhahn

reply via email to

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