btw, I also tried linking all shared except static libGLU,
gcc -o glxinfo -O2 -L…/…/exports/lib glxinfo.o …/…/exports/lib/libGLU.a -lGL -lXext -lX11 -L/opt/X11R6/lib -lm -lsocket
this also links fine.
error message about std::terminate only happens if I link
shared libGLU.so
Frank
On Thu, 27 Sep 2001, Frank Liu wrote:
nothing special, I just cut/paste from the screen and added -static,
see below:
/rtp/xf4/xc/programs/glxinfo> make
rm -f glxinfo
gcc -o glxinfo -O2 -L…/…/exports/lib glxinfo.o -lGLU -lGL -lXext -lX11 -L/opt/X11R6/lib -lm -lsocket
…/…/exports/lib/libGLU.so: undefined reference to `std::terminate(void)’
collect2: ld returned 1 exit status
make: *** [glxinfo] Error 1
/rtp/xf4/xc/programs/glxinfo> gcc -static -o glxinfo -O2 -L…/…/exports/lib glxinfo.o -lGLU -lGL -lXext -lX11 -L/opt/X11R6/lib -lm -lsocket
/rtp/xf4/xc/programs/glxinfo
linking libcpp did the trick by the way. I just don’t understand
why we need it in shared but not in static.
Thanks!
Frank
On 27 Sep 2001, Colin Burgess wrote:
Is there a difference is how you are linking it manually vs the what the makefile is
doing?
Frank Liu <> liug@mama.indstate.edu> > wrote:
How come the static link doesn’t need that lib? Are you saying
we need some extra lib depending on whether we are linking static
or dynamic?
On 27 Sep 2001, Colin Burgess wrote:
It’s in libcpp.so
Frank Liu <> liug@mama.indstate.edu> > wrote:
for xf86 4.1, while compile “xc/programs/glxinfo”, at the final link, it gives:
…/…/exports/lib/libGLU.so: undefined reference to `std::terminated(void)’
If I try to manually link to to the static libGLU.a, there is
no such error.
what is this “std::terminated(void)”, why it only happens in shared lib?
frank
\
cburgess@qnx.com