Re: XForms: opengl and shared libraries

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 7 Oct 97 06:42:03 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> 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

which will be useful in sorting out the parameters which ld wants.
There may also be some gcc flags to generate the object code in the
proper manner, probably something like

CCFLAG=-O -fPIC

spl
_________________________________________________
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/