libtool
[Top][All Lists]
Advanced

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

Re: Building .so files only.


From: Benjamin Reed
Subject: Re: Building .so files only.
Date: Fri, 29 Aug 2003 07:55:46 -0400

On Aug 29, 2003, at 12:55 AM, Daniel Reed wrote:

To produce only .la and .so files, you can pass -module -avoid-version to
libtool. In Automake, you can do this by using something similar to:

pkglib_LTLIBRARIES = mymod.la
mymod_la_SOURCES = mymod.c

mymod_la_LDFLAGS = -module -avoid-version

This also removes the requirement that the library name start with "lib."

This may work on Linux, but on some platforms, this produces a very different file from a library created without -module.

"modules" are meant to only be used as a plugin, ie dlopened or something similar. With the module flag, it's a plugin; without, it's a shared library.

If you're using -module to make shared libs (that will get linked against by other things), your project isn't portable. ;)


--
We put a lot of thought into our defaults.  We like them.  If we
didn't, we would have made something else be the default.  So keep
your cotton-pickin' hands off our defaults.  Don't touch.  Consider
them mandatory.  "Mandatory defaults" has a nice ring to it.





reply via email to

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