• 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: Basic globals/extern question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic globals/extern question


  • Subject: Re: Basic globals/extern question
  • From: Michael Babin <email@hidden>
  • Date: Sat, 17 Feb 2007 10:49:35 -0600

On Feb 16, 2007, at 9:22 PM, Ken Tozier wrote:


On Feb 16, 2007, at 10:12 PM, email@hidden wrote:

Are you declaring the implementations as static in your implementation?  (you shouldn't be)

Thanks Wade. It looks like "static" was the culprit.

I'm curious as to why that would cause a problem though. I would think that function pointers would have to be static.

Variables or function prototypes declared as static outside the scope of any function/method have file scope. Even if you're including the header file with the same variable name declared as extern, the compiler will interpret this as a reference to a separate variable of the same name (which is effectively hidden for the scope of this file).

-- 
Michael Babin email@hidden
Order N Development, LLC http://www.orderndev.com/
Goldfish Aquarium for Mac: http://www.lifeglobe.com/product/index.php?pltid=2&ref=OrderNDev



 _______________________________________________
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: 
 >Basic globals/extern question (From: Ken Tozier <email@hidden>)
 >Re: Basic globals/extern question (From: email@hidden)
 >Re: Basic globals/extern question (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: What are your top desired improvements in Xcode ?
  • Next by Date: Re: What are your top desired improvements in Xcode ?
  • Previous by thread: Re: Basic globals/extern question
  • Next by thread: Re: Basic globals/extern question
  • Index(es):
    • Date
    • Thread