Re: XForms: opengl and shared libraries

Manuel J. Garcia (mgarcia@aero.usyd.edu.au)
Wed, 08 Oct 1997 10:21:13 +1000

To subscribers of the xforms list from "Manuel J. Garcia" <mgarcia@aero.usyd.edu.au> :

> > the readme mentioned something about compiling the included opengl.c and
> > integrating it into the shared library. i could do the compiling part.. but
> > how do i put it into the shared library? (i've looked up the gcc faq but
> > the link to mit doesn't work). better yet, is there a place where i could
> > find out about this? i'm relatively new to unix (just installed linux).
>
> The place to look is in the man page for ld or ld.so. Also refer to
> the mkconfig.h file at the root of the XForms distribution. There
> should be some lines at the bottom which look like
>
> #
> # this is how the shared library is made
> #
> MKSHLIB=ld -shared -soname $(SHARED_SO) -o $(SHARED_LIB)\
> `ls *.o|grep -v gl.o` ulib/*.o ../xpm-3.4g/lib/libXpm.a
>

I had the same problem. I wanted to add the file gl.o to the
shared library ( libforms.so.0.87) given the files libforms.so.0.87,
libforms.a, and gl.o. Notice that I did not had all the *.o files, so I
could not use
the command used in the mkconfig.h file.

by suggestion of Dr. Zhao I try the following command

ld -shared -soname libforms.so.0.87 -o libforms.so.0.87 libforms.a gl.o

but still it didn't work, it seems that the problem is when it tries to
link a static library with a shared library.

I still haven't found the solution, in the mean time i'm linking
statically with the gl.o file.

cheers

----------------------------------------------------------------------
Manuel Julio Garcia
Aeronautical Engineering Dept.
The University of Sydney, NSW 2006
Australia

Tel: +2 9351 2342
Fax: +2 9351 4841
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/