Re: Illegal declaration - but why?
Re: Illegal declaration - but why?
- Subject: Re: Illegal declaration - but why?
- From: "Justin C. Walker" <email@hidden>
- Date: Wed, 3 Jan 2007 20:38:49 -0800
On Jan 3, 2007, at 20:08 , Hugh Brown wrote:
I'm new to xcode, and have just ben handed a project to port to the
mac. It's a plain vanilla C program, but when I try to compile it
I get a string of errors complaining about the headers. A typical
error message is:
error: parse error before "SetConfigs"
data definition has no type or storage class
The declaration of SetConfigs looks like
bool SetConfigs(char *errString);
which looks pretty legit to me.
I don't think 'bool' is a valid type in C. It has to be defined by a
typedef or a #define (possibly it appears in a header file that is
external to the project you have).
I'm a bit puzzled that you don't see a complaint about 'bool',
though. Is the "parse error" message all you see?
I get this pair of error messages for every function declaration
in the project. Obviously, I'm doing something fundamentally
wrong, but I can't see what. Isthere something particular to xcode
that prevents this from compiling?
Xcode doesn't really care. It's the compiler that's complaining
(Xcode is an IDE), and the compiler is the Gnu C compiler.
Is there an on-line reference somewhere that will answer basic
questions like this so I don't pester the list with them?
There are sites that provide information about the variants of C and C
++, but I don't know that they would be of direct help, unless you
knew to ask "is 'bool' a valid type?".
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
If you're not confused,
You're not paying attention
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden