[gclist] Problems compiling with Xlib

John Palmieri johnp@martianrock.com
Thu, 06 Apr 2000 15:48:15 -0400


Hello, I'm new to this list.  I am writing a C++ program under linux
that uses Boehm-Demers-Weiser conservative garbage collector.  The code
was compiling fine when I was just writing to the console but now I have
the backend stuff done I started to move everything to an X display.   I
have read somewhere that X uses GC.  Consequently I am getting duplicate
symbol compiling errors (I have gc_cpp.h included in mriIObject.h):

In file included from src/backend/mriIObject.h:25,
                 from src/backend/mriIData.h:25,
                 from src/backend/mriNumber.h:22,
                 from src/frontend/X/player.cpp:32:
src/backend/garbage_collector/gc/include/gc_cpp.h:141: `GC' redeclared
as different kind of symbol
/usr/include/X11/Xlib.h:234: previous declaration of `typedef struct
_XGC * GC'
make: *** [bin/snaglepuss] Error 1

Is there a way around this?  I don't want to use Xlib's defines in the
backend because I want to keep it frontend independent (Say someone
wants to create a SVGALib frontend as opposed to an X frontend).  Any
suggestions?

Thanks,
Quinticent
Martian Rock Interactive