Subject: Re: urgent! help!
To: Konstantinos Margaritis <markos@acropolis.net>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: port-amiga
Date: 07/04/1997 17:32:56
>    One more question. How do I include an object file in a shared lib to
> produce a new shared lib?

You don't. 

A "shared library" is NOT a library, in structure, but more like an
monolithic object file (with special relocation information).

You need to build the object file you need to add like you build the
others you include into the (new) shared library, e.g.,

$(CC) $(OTHERCCFLAGS) -fpic -c gl.c # or for very big ones, -fPIC

to produce a gl.o which can be included in a shared lib.

Basically, if you dont have the sources, you can't; "static" libs
(libforms.a) normally contain objects not compiled with -fpic, because
they are slightly smaller and faster.

>    I tried the following for the libforms.so.0.86 and gl.o (from the XForms
> GUI lib; the static lib includes the gl.o but the dynamic does not)
>    
>    ld -x -Bshareable -Bdynamic -L<path to lib> -lforms gl.o -o libforms_new.so

Your only option is to just add gl.o to the link command of the
programs you want to build, and to complain to the author of the forms
library (its semi-commercial, as I remember?)

> PS. Am I right in assuming you are greek?

Nai. Eimai.

Geia,
	-is