[Top] [All Lists]

Re: [ogl-sample] SGI SI GLU integration

To: ogl-sample@xxxxxxxxxxx
Subject: Re: [ogl-sample] SGI SI GLU integration
From: blythe@xxxxxxxxxxxx
Date: Wed, 28 Jun 2000 13:33:20 -0700
Reply-to: ogl-sample@xxxxxxxxxxx
Sender: owner-ogl-sample@xxxxxxxxxxx
| 2) The libGLU.so built from the GNUmakefile does not contain the C++
| symbols like __pure_virtual. This is Ok if you link it with a C++ app,
| but it causes an undefined symbol when linking with C programs or
| libraries. I could work around this problem by linking by hand the
| libGLU.so using g++ instead of ld:

| g++ -shared -Wl,-soname,libGLU.so libutil/*.o libtess/*.o etc.
| Fixing this would require big change the GNUmakefile and included files
| in the ogl-sample package. I didn't do it because I was afraid of
| breaking other things (in the build of other libraries than GLU).

there was a fixed checked in to the tree a while ago (April), but no
new tarball was created.  I think a less intrusive change would be
be something like:

g++ -shared -Wl,-soname,libGLU.so -Wl,--whole-archive $(SRCLIBS) 
-Wl,--no-whole-archive -o $@

I've made a more portable version of this (diffs below) and will check it
in later today (if no one objects)

| Anyway, I did all that with the downloadable tarball of ogl-sample
| (ogl-sample-20000126.tgz) because I was unable to get the CVS source
| tree version (apparently, there is a broken link on the web page).
| Any help or advices greatly appreciated.

Index: GNUmakefile
RCS file: /home/pub/cvs/projects/ogl-sample/main/gfx/lib/glu/GNUmakefile,v
retrieving revision 1.1
diff -r1.1 GNUmakefile
< TARGET = libGLU.so
> TARGET = libGLU.so.1
< # There should be a cleaner, version-independent way to do this
< LLDLIBS += -L/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66 -lstdc++
> # use g++ rather than ld
> LD=g++
> LDDSOFLAGS=-shared -Wl,-soname=$(TARGET) -Wl,--whole-archive
> LDFLAGS=-Wl,--no-whole-archive

<Prev in Thread] Current Thread [Next in Thread>