automake
[Top][All Lists]
Advanced

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

Re: Problems with linking modules


From: Bob Friesenhahn
Subject: Re: Problems with linking modules
Date: Tue, 8 Nov 2005 11:25:27 -0600 (CST)

It is not portable for modules to depend on each other. A better approach is to introduce a third shared library and have the two modules depend on that shared library. Any common code can live in the shared library.

Bob

On Tue, 8 Nov 2005, Jacob Kroon wrote:

Hi, I'm using autoconf/automake to build 2 modules (xxx_la_LDFLAGS = -avoid-version -module), lets call them foo.la and bar.la. The problem I'm having is that bar.la uses symbols from foo.la, so I need to link bar.la with foo.la, but this is not portable according to libtool. If I do run "make" everything compiles, and "ldd .libs/bar.so" shows that it is linked to foo.so! Great! But if I do "make install" it breaks, since it tries to link with "-lfoo" which wont work since I'm using the name foo.so, not libfoo.so. I _do_ want the names foo.so/bar.so not libfoo.so/libbar.so (the reason being that they are python modules, so I dont want the "lib" prefix).

Is there a way to make the above thing work, keeping the names foo.so/bar.so ?

I've looked into using '-dlopen path/to/foo.la' but I can't figure out if it's the right way to go...

Please CC my email since I'm not a subscriber to the mailing list.

Regards Jacob Kroon




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




reply via email to

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