I have scoured the google groups, mostly
pilot.programmer.codewarrior, for this error, and
found many relevant documents. Unfortunately, most of
the concentrated on C/C++ differences like whether or
not a typedef is required, and didn't help me resolve
my problem. I also searched the archives of this group
and didn't get any hits.
I'm still using the trial version of CodeWarrior. I
went through the tutorials for a while, then started
doing things not covered there, like using bitmaps for
buttons, trying to declare global variables and
structs in a separate files, etc. That's where I'm
getting this error.
The About CodeWarrior says I'm using version 4.2.5...,
but this is such a fundamental thing I don't think the
version should matter.
All I'm trying to do is define a struct in a separate
file, and include that file in another header file.
Here's the relevant code from my main header file
(which is compiling and running fine without this
include, btw) :
#include "scDataTypes.h" // Structure Definitions
All that this scDataTypes.h file contains is this :
typedef struct {
Byte Terrain;
Byte X;
Byte Y;
} TILE;
and the errors :
Error : ';' expected
scDataTypes.h line 3 Byte Terrain;
Project: sc2.mcp, Target: Starter-Debug, Source File:
sc.c
Error : declaration syntax error
scDataTypes.h line 4 Byte X;
Project: sc2.mcp, Target: Starter-Debug, Source File:
sc.c
Error : declaration syntax error
scDataTypes.h line 5 Byte Y;
Project: sc2.mcp, Target: Starter-Debug, Source File:
sc.c
Error : declaration syntax error
scDataTypes.h line 6 } TILE;
Project: sc2.mcp, Target: Starter-Debug, Source File:
sc.c
Any help would be greatly appreciated, I've been stuck
on this for days now and haven't got much response
from other groups. Thanks!
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/