Unable to Compile Simple Application (Errors)

2009-09-27 Thread Mick Walker
Hi, I am currently working my way through Learn Objective C on the Mac, and have typed one of the code samples into Xcode (ver 3.2), however Xcode gives me a compile error, I think I have typed the code letter for letter, so I was just wondering if someone could tell me why the following

Re: Unable to Compile Simple Application (Errors)

2009-09-27 Thread Graham Cox
Hi Mick, The problem is that none of the functions here have prototypes, so the use of 'colorName' comes before the definition of the function 'colorName', which then has not matched the compiler's assumptions. Also, as given, the code spits out many warning about missing prototypes,

Re: Unable to Compile Simple Application (Errors)

2009-09-27 Thread Kyle Sluder
There should be more than just that one line. C requires that functions be declared before they are used; if they are not, it assumes they take any number of parameters and return an int. At the points at which you call colorName, the compiler hasn't seen a declaration for colorName yet, but can