Re: Build errors
Re: Build errors
- Subject: Re: Build errors
- From: Steve Christensen <email@hidden>
- Date: Mon, 11 Sep 2006 18:25:47 -0700
On Sep 11, 2006, at 4:08 PM, Shawn Erickson wrote:
On 9/11/06, Clarence Badger <email@hidden> wrote:
Here is a sample of code that produces some of my errors.
Some of your errors? I only see it report one error on my system using
either gcc-4.0 (4.0.1) or gcc-3.3.
Try removing the incorrect use of void in the function call on line
17. It should just be "OKInfo();".
[0:523] > gcc main.c
main.c: In function 'main':
main.c:17: error: parse error before 'void'
[0:529] > cat -n /Users/serickson/Documents/Downloads/main.c
1 //
2 // main.c
3 // buggy
4 //
5 // Created by Clarence Badger on 9/11/06.
6 // Copyright __MyCompanyName__ 2006. All rights reserved.
7 //
8
9 #include <Carbon/Carbon.h>
10
11 void OKInfo(void);
12
13 int main(int argc, char* argv[])
14 {
15 OSStatus err;
16
17 OKInfo(void);
18
19 return err;
20 }
21
22 void OKInfo(void)
23 {
24 int num = 0;
25 num++;
26 }
27
Also, err isn't being initialized, so main()'s return value is
indeterminate. And if you want to be picky, neither of these are
Xcode-specific issues but plain old basic C...
steve
_______________________________________________
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