[gnu.g++.help] g++ 1.37.2 beta & SunPHIGS 1.3 problem

metz@IAM.UNIBE.CH (Igor Metz) (05/31/91)

>Config: SparcStation IPC, SunOS 4.1.1, g++ 1.37.2 beta (based on GCC 1.37)

I try to compile a C++ program which uses SunPHIGS 1.3 functions.  Compilation
works fine (well, after hacking phigs.h), but linking gives me the following
error:

g++ -O -I. -I/usr/local/test/include -L/usr/local/test/lib  ex1.o -lphigs -lsuntool -lsunwindow -lpixrect -lm -o ex1
cb_colr.o: Undefined symbol __GLOBAL_OFFSET_TABLE_ referenced from text segment
....[deleted]....
cb_ctrl.o: More undefined symbol __GLOBAL_OFFSET_TABLE_ refs follow
gmake: *** [ex1] Error 1

The problem is that the code in libphigs.a has been compiled with 'cc -pic'.
Is there a known workaround?

Igor Metz
Institut fuer Informatik und angew. Mathematik, Universitaet Bern, Switzerland.
domainNet: metz@iam.unibe.ch               Phone: (0041) 31 65 49 90
ARPA:      metz%iam.unibe.ch@relay.cs.net  Fax:   (0041) 31 65 39 65