Syntax error

Member
Posts: 277
Joined: 2004.10
Post: #1
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:
Code:
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)

Global warming is caused by hobos and mooses
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #2
You have to declare variables before doing anything else, I believe.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #3
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.
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #4
Thanks guys... I'm working with somebody elses code and I always declare the variables first.


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

So now I gota fix that... Annoyed

Global warming is caused by hobos and mooses
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #5
Might I mention that Deystroy isn't a word? Wink

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #6
Dude... you have no idea how much that helped.

Thanks guys!

Global warming is caused by hobos and mooses
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  syntax for C++ initializer list? WhatMeWorry 6 8,655 Jun 21, 2006 10:25 AM
Last Post: NCarter