Charles Williams wrote:
[]
gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I/sw/share/Geomview -I../../../../include -I/usr/X11R6/include -I.. -no-cpp-precomp -Dunix -D__FreeBSD__=5 -I/sw/include -g -O2 -c buildinfo.c
gcc -g -O2 -force_flat_namespace -L/sw/lib -o gvx gvappear.o
[]
../../../../src/lib/oogl/util/libooglutil.a -L/usr/X11R6/lib -lGL -lGLU -lXm -lXmu -L/usr/X11R6/lib -lSM -lICE -lXt -lXext -lX11 /usr/bin/ld: multiple definitions of symbol _glPointParameteri
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) definition of _glPointParameteri
/usr/X11R6/lib/libGL.dylib(dri_dispatch.o) definition of _glPointParameteri
[]
I suppose that using the '-multiply_defined suppress' flag might help here, but then I won't know if I'm using the correct OpenGL libraries (I'm not sure what might be different between the system and X11 versions). Has anyone else run into this problem and are there any suggestions on what to try?
You need to remove the -force_flat_namespace flag, then the multiply-defined symbols give ony warnings. I think you need to add some -lXm flags at a couple of places, too, IIRC. I had been there some weeks ago, but gave up after running into multiply-defined symbol errors later on, even without the -force_flat_namespace flag:
gcc -g -O2 -L/usr/X11R6 -lXm -L/sw/lib -o clip clip.o clipoogl.o clipmain.o ../../../../src/lib/gprim/stub/libstub.a ../../../../src/lib/oogl/wa/libwa.a ../../../../src/lib/camera/libcamera.a ../../../../src/lib
[...]
../../src/lib/oogl/lisp/liblisp.a ../../../../src/lib/oogl/refcomm/librefcomm.a ../../../../src/lib/oogl/util/libooglutil.a
/usr/bin/ld: multiple definitions of symbol _BezierReDice
../../../../src/lib/gprim/bezier/libbezier.a(bezdice.o) definition of _BezierReDice in section (__TEXT,__text)
../../../../src/lib/gprim/stub/libstub.a(bezier.o) definition of _BezierReDice in section (__TEXT,__text)
[and so on]
This is something more profound, because there really are two different definitions of that symbol in two different libraries that are both included on the linker line.
--
Martin