Re: Basic globals/extern question
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:
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).
|
_______________________________________________
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