• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Build errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Build errors (From: Clarence Badger <email@hidden>)
 >Re: Re: Build errors (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: Re: Build errors
  • Next by Date: InfoPlist.strings and the Preproccesor
  • Previous by thread: Re: Re: Build errors
  • Next by thread: Re: Build errors
  • Index(es):
    • Date
    • Thread