On Apr 6, 2006, at 2:09 AM, James Turner wrote:


I'm trying to compile FlightGear 0.9.10-pre3 on my PowerBook, but the installation of simgear fails while "make" with following error messages:
if g++ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../..  -I/FlightGear/include  -g -O2 -D_REENTRANT -MT visual_enviro.o -MD -MP -MF ".deps/visual_enviro.Tpo" -c -o visual_enviro.o visual_enviro.cxx; \
then mv -f ".deps/visual_enviro.Tpo" ".deps/visual_enviro.Po"; else rm -f ".deps/visual_enviro.Tpo"; exit 1; fi
In file included from ../../simgear/scene/sky/bbcache.hxx:30,
                 from ../../simgear/scene/sky/newcloud.hxx:31,
                 from visual_enviro.cxx:36:
../../simgear/screen/RenderTexture.h:343: error: 'CGLContextObj' is used as a
   type, but is not defined as a type.
../../simgear/screen/RenderTexture.h:344: error: 'CGLPBufferObj' is used as a
   type, but is not defined as a type.
../../simgear/screen/RenderTexture.h:346: error: 'CGLContextObj' is used as a
   type, but is not defined as a type.
make[3]: *** [visual_enviro.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
I'm using Mac OS X.4.6 and Xcode 2.2.1. What am I doing wrong? What I need to do to finish building simgear and FlightGear on my machine? I'm a not so experienced programmer, or exactly, it's almost my first try to build a programm from source :-).
Can you please help me?

Ah, this is due to the render-texture code for OS-X code that was patched into SimGear; I had to fix an include to make it build, I'll send the (minor) patch for that to Erik once I get home; basically you need to pull in <OpenGL/CGLTypes.h> at the top of the file. The bigger problem is, the RenderTexture code doesn't work, and worse, is resetting the active GLContext to NULL when it fails, so I was getting errors from PLIB about no context being active during startup. I disabled the RenderTexture code in my local tree by adding an early return to the initialise() method.

If you just want to fly, you can try the binary I posted yesterday, of course (works on PPC Tiger and Panther, but crashes under Rosetta)


James,

I just tried to build simgear from CVS and got a similar, but not identical error to the above:

g++ -DHAVE_CONFIG_H -I. -I. -I../../simgear -I../..  -I/Users/dersh/Programming/FlightGear/include  -g -O2 -D_REENTRANT -c -o visual_enviro.o `test -f 'visual_enviro.cxx' || echo './'`visual_enviro.cxx
../../simgear/screen/RenderTexture.h:343: error: 'CGLContextObj' does not name a type
../../simgear/screen/RenderTexture.h:344: error: 'CGLPBufferObj' does not name a type
../../simgear/screen/RenderTexture.h:346: error: 'CGLContextObj' does not name a type
make[2]: *** [visual_enviro.o] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1

Were you able to get the patch sent to Erik?  Was there another change somewhere else that raised this similar error? 
Can you be a little more specific about your fix?  Which file did you add CGLTypes.h to the top of?

Thanks,

--Adam


Reply via email to