• 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: Cannot declare variables in the middle anymore
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot declare variables in the middle anymore


  • Subject: Re: Cannot declare variables in the middle anymore
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Tue, 8 Jul 2003 14:40:42 +0100

Amazing!!!
I have been developing software on Cocoa since 2001.... and I was always
able to declare variables in the middle of the methods. I have thousands of
lines of code with variables declared in the middle of the method. For sure!
And it worked very well.
And even if I upgraded from OS X 10 throught 10.2.6 and from the first to
the last version of Developer Tools, I was able to do that all the time.
What should I think? Maybe I have to mark some check-box?
Maybe in my machine something has been corrupted?

You've accidentally switched to gcc 2.95 in Project Builder; this happens when you install XCode or the GCC 3.3 update (check the release notes for the GCC 3.3 update for more information on how to use GCC 3.3 from Project Builder if that was what you wanted to do). To change back to GCC 3.1, go to a terminal window and enter "sudo gcc_select 3.1". Your builds should start working again (you might have to restart Project Builder).

(GCC 3 and later support declarations in the middle of a function, just like in C++. GCC 2.95 didn't, which is why you get the error.)

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Cannot declare variables in the middle anymore
      • From: Thomas Harrington <email@hidden>
    • And Debugging in Xcode? Where's THAT checkbox? (Re: Cannot declare variables in the middle anymore)
      • From: Don Briggs <email@hidden>
    • Re: Cannot declare variables in the middle anymore
      • From: Lorenzo <email@hidden>
References: 
 >Re: Cannot declare variables in the middle anymore (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: non-blocking file writes
  • Next by Date: Re: NSString to int (or double) conversion
  • Previous by thread: Re: Cannot declare variables in the middle anymore
  • Next by thread: Re: Cannot declare variables in the middle anymore
  • Index(es):
    • Date
    • Thread