PDA

View Full Version : Syntax error


BinarySpike
2005.08.21, 06:58 PM
I keep getting a stupid syntax error...... "syntax error before `long'"


Here's the code:
http://pastebin.com/342587


here's all the errors I get:

main.c:24: parse error before `long'
main.c:32: warning: implicit declaration of function `aglDeystroyPixelFormat'
main.c:32: `pixelFormat' undeclared (first use in this function) (Each undeclared identifier is reported only once for each function it appears in.)
main.c:35: parse error before `short'
main.c:46: `bufferRect' undeclared (first use in this function)
main.c:46: `left' undeclared (first use in this function)
main.c:47: `bottom' undeclared (first use in this function)
main.c:48: `width' undeclared (first use in this function)
main.c:49: `height' undeclared (first use in this function)
main.c:51: `context' undeclared (first use in this function)
Build failed (9 errors, 1 warning)

Steven
2005.08.21, 07:26 PM
You have to declare variables before doing anything else, I believe.

akb825
2005.08.21, 07:30 PM
Since it's a .c file, if the compiler is old enough/has an old enough standard, then yes. (since you're still using Jaguar, it's possible) Otherwise it doesn't matter. It's something to try, anyway.

BinarySpike
2005.08.21, 07:55 PM
Thanks guys... I'm working with somebody elses code and I always declare the variables first.


*edit*
I get
/usr/bin/ld: Undefined symbols:
_aglDeystroyPixelFormat


So now I gota fix that... :\

Steven
2005.08.21, 08:01 PM
Might I mention that Deystroy isn't a word? ;)

BinarySpike
2005.08.21, 08:24 PM
Dude... you have no idea how much that helped.

Thanks guys!