Alexandre Oliva writes:
> On Feb 14, 2001, Jeremy Slade <[EMAIL PROTECTED]> wrote:
>
> > It seems that what I really what is to create swigShapeUtils.sl
> > using the original ../../lib/*.lo files build earlier (and used to
> > create libShapeUtils.sl), rather than create swigShapeUtils.sl with
> > a run-time dependency on libShapeUtils.sl (which of course isn't
> > installed at the time I'm build swigShapeUtils.sl). In short, I
> > think I ultimately want:
>
> > ld -b -E -o swigShapeUtils.o swigShapeUtils.lo ../../lib/*.lo
>
> > and not
>
> > ld -b -E -o swigShapeUtils.o swigShapeUtils.lo -L../../lib -lShapeUtils
>
> > But how do I achieve that?
>
> Create ShapeUtils as a libtool convenience library. If you also want
> it to be installed as a separate shared library, you can create such a
> separate shared library, naming the convenience library differently.
> Ditto for MiscContrib.
As I understand it, a 'convenience' library is intended for two
things: a static convenience lib is for linking into a program
(therefore it contains the non-PIC objects, *.o), and a shared convenience
lib is for linking into another shared lib (therefore it contains the
PIC objects, *.lo). And convenience libraries are not installed, so
basically they are only for use during the build process of the
package that contains them -- not for linking a program or shared lib
in another package.
In my case here, I want to create a shared lib, swigShapeUtils.sl,
using all the PIC objects from libMiscContrib.la (created in a
different package) and from libShapeUtils.la (created earlier in the
same package). So I think I want to install the MiscContrib
'convenience lib' to a directory where it is accessible for ShapeUtils
to link against.
The way things look currently, I can install libMiscContrib.a and
libShapeUtils.sl, but not a libtool convenience lib. To build
swigShapeUtils.sl, it can't link against libMiscContrib.a since it
doesn't have PIC objects, and if it links against libMiscContrib.sl,
then it has a run-time dependency on libMiscContrib.sl, which I need
to avoid. The same thing applies for linking swigShapeUtils.sl
against libShapeUtils.a and libShapeUtils.sl.
Without libtool, this is all very easy to do -- albeit not easy to do
in a platform-independent way. I would just create and install
something like libMiscContrib_PIC.a and libShapeUtils_PIC.a that I
could then use to create swigShapeUtils.sl. Why is this so hard with
libtool? Or maybe it's not hard and I'm really missing something...
Jeremy
--
Jeremy Slade
Hewlett-Packard Company VLSI Technology Center - http://cpus.hp.com/
[EMAIL PROTECTED] (970) 898-7881