libtool
[Top][All Lists]
Advanced

[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:45:35 -0500 (CDT)

On Wed, 2 Jun 2004, Stephane Bortzmeyer wrote:

[Feel free to redirect to the proper mailing list if it is not a
libtool problem, after all.]

I have a program with binary plugins. It loads them by dlopen(3). I
develop on Debian/Linux (where you need to pass -dl to the linker) and
NetBSD (where you need nothing special). I use Autoconf, Automake and
libtool.

How to I set up the proper passing of flags to the linker?

If you are willing to build and link your loadable modules using libtool, then it as simple as linking using libtool's -module option. I pass the options "-no-undefined -module -avoid-version" while building modules. The options may be pased via LDFLAGS.

I use something like ...

MODULECOMMONFLAGS = -no-undefined -module -avoid-version

# ART module
art_la_SOURCES      = art.c
art_la_LDFLAGS      = $(MODULECOMMONFLAGS)
art_la_LIBADD       = $(LIBMAGICK)

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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