Game Development Community

Can't compile

by Paul Grant · in Technical Issues · 06/15/2006 (3:17 pm) · 13 replies

I'm having trouble compiling the engine. I'm using Kubuntu Dapper 6.06. After a lot of "warnings" I get two errors at the end of the "make" and it won't compile. For the record, the demo app runs fine with sound, albeit a little slowly. I followed the instructions found here:

http://www.garagegames.com/docs/tge/general/apbs04.php

Here is the last few lines of the 'make':

./platformX86UNIX/x86UNIXState.h:36: error: ISO C++ forbids declaration of 'Display' with no type
./platformX86UNIX/x86UNIXState.h:36: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:37: error: 'Window' does not name a type
./platformX86UNIX/x86UNIXState.h:38: error: ISO C++ forbids declaration of 'Screen' with no type
./platformX86UNIX/x86UNIXState.h:38: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:56: error: ISO C++ forbids declaration of 'Display' with no type
./platformX86UNIX/x86UNIXState.h:56: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:58: error: expected ';' before 'public'
./platformX86UNIX/x86UNIXState.h:61: error: 'Display' has not been declared
./platformX86UNIX/x86UNIXState.h:67: error: 'Screen' has not been declared
./platformX86UNIX/x86UNIXState.h:69: error: ISO C++ forbids declaration of 'Screen' with no type
./platformX86UNIX/x86UNIXState.h:69: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:72: error: expected ';' before 'void'
./platformX86UNIX/x86UNIXState.h:85: error: 'Window' has not been declared
./platformX86UNIX/x86UNIXState.h:86: error: 'Window' does not name a type
./platformX86UNIX/x86UNIXState.h: In member function 'void x86UNIXPlatformState::setDisplayPointer(int*)':
./platformX86UNIX/x86UNIXState.h:62: error: 'mDisplay' was not declared in this scope
./platformX86UNIX/x86UNIXState.h: In member function 'void x86UNIXPlatformState::setScreenPointer(int*)':
./platformX86UNIX/x86UNIXState.h:68: error: 'mScreenPointer' was not declared in this scope
./platformX86UNIX/x86UNIXState.h: In member function 'void x86UNIXPlatformState::setWindow(int)':
./platformX86UNIX/x86UNIXState.h:85: error: 'mCurrentWindow' was not declared in this scope
./platformX86UNIX/x86UNIXState.h: At global scope:
./platformX86UNIX/x86UNIXState.h:209: error: ISO C++ forbids declaration of 'Display' with no type
./platformX86UNIX/x86UNIXState.h:209: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:212: error: ISO C++ forbids declaration of 'Display' with no type
./platformX86UNIX/x86UNIXState.h:212: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:222: error: expected ';' before 'void'
./platformX86UNIX/x86UNIXState.h:251: error: ISO C++ forbids declaration of 'Display' with no type
./platformX86UNIX/x86UNIXState.h:251: error: expected ';' before '*' token
./platformX86UNIX/x86UNIXState.h:260: error: expected ';' before '}' token
./platformX86UNIX/x86UNIXState.h: In member function 'void DisplayPtrManager::closeDisplay()':
./platformX86UNIX/x86UNIXState.h:227: error: 'mDisplay' was not declared in this scope
./platformX86UNIX/x86UNIXState.h:227: error: 'XCloseDisplay' was not declared in this scope
./platformX86UNIX/x86UNIXState.h: In constructor 'DisplayPtrManager::DisplayPtrManager()':
./platformX86UNIX/x86UNIXState.h:238: error: 'mDisplay' was not declared in this scope
make[1]: *** [out.GCC3.DEBUG/platformX86UNIX/x86UNIXFileio.obj] Error 1
make: *** [default] Error 2

Any ideas?

#1
06/15/2006 (3:34 pm)
Your missing the Xlib includes.
I don't know why but I am sure you can track that down.

Edit:
I thought this sucker used that crappy sdl library when in linux? hmm..

anyhow this is better IMHO.
#2
06/16/2006 (1:33 pm)
For your information I use ubuntu dapper

eviwo.free.fr/torque/compile.html
#3
06/16/2006 (6:11 pm)
Thanks Philippe C! I've finally managed to get it to compile under linux! :-)

Now if it were only faster, but I suspect that is a memory issue as I only have 256MB RAM in this machine.
#4
06/17/2006 (12:12 am)
I have 512 mo on my machine

do you have set you graphics cards ?

I you have a nvidia , your have to :

1. install nvdia drivers with synaptic
2. terminal window : sudo nvidia-glx-config enable
3. reboot your computer in order to set correctly the nvidia driver
#5
06/17/2006 (12:41 am)
My graphics card is an ATI Radeon 9250 with 256MB of video memory. I'm running the latest linux driver from ATI. I'm pretty sure it's my system memory that's the problem, but if you have any suggestions I'm willing to entertain them.
#6
06/17/2006 (1:21 am)
Use the tools : system/administration/system monitor, in order to check your memory / cpu
#7
06/17/2006 (4:07 am)
KInfoCenter says my total physical memory is 249 MB, and I have a 2 GHz Intel Celeron processor. Plus, I am only getting about 1,400 FPS in glxgears, and yes, I know it's not a benchmark, but still.

One thing I could do is boot into windows and see how the SDK performs.
#8
06/17/2006 (8:29 pm)
I just booted into windows xp and ran the demo app. The performance under windows blows away my linux opengl performance markedly. For one thing, the starter.fps is much smoother with no speed ups and slowdowns. The only thing I can think of is perhaps the linux ATI driver sucks compared to the windows catalyst driver.
#9
06/18/2006 (2:57 am)
Have a look on wiki.ubuntu.com/BinaryDriverHowto/ATI

in order to check if your driver is well installed and opengl configured correctly.
#10
06/18/2006 (8:01 am)
I just did this again and got no change.
#11
06/18/2006 (8:49 am)
Paul,

I have no more idea to help you

Philippe
#12
06/29/2006 (11:22 am)
Im going with user error ;)

or maybe ATI just sucks
i have nvidia

torque seems to run equally as fast on either windows or linux

world of warcraft runs at about 10% slower on linux (thru cedega) than it does on windows, but cedega is like translating directX code into openGL i think..
#13
07/31/2007 (4:04 am)
Ati have a "ported and non functional 3D hardware acceleration" driver... maybe in a couple of years we might see a a good driver from AMD/ATI... for now i will suggest to get Nvidia chipset that run just perfectly...

Cheers