On Wed, 2 Jun 2004, Stephane Bortzmeyer wrote:

On Wed, Jun 02, 2004 at 08:45:35AM -0500,
Bob Friesenhahn <[EMAIL PROTECTED]> 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
option.

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
======================================
Bob Friesenhahn
[EMAIL PROTECTED]
http://www.simplesystems.org/users/bfriesen


_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to