Re: Newbie Question - #include scope
Re: Newbie Question - #include scope
- Subject: Re: Newbie Question - #include scope
- From: Jeremy Pereira <email@hidden>
- Date: Thu, 11 Dec 2008 09:11:44 +0000
On 10 Dec 2008, at 23:52, Mark Wagner wrote:
On Wed, Dec 10, 2008 at 12:22, Steve Checkoway <email@hidden> wrote:
On Wed, Dec 10, 2008 at 11:19:08AM -0800, Gil Dawson wrote:
I made up a little project to demonstrate this thing. The project
contains three files (listed below); "test.c" #includes the other
two.
The first #included file declares a global variable, MyData, and
sets it.
The second #included file uses that variable.
This isn't an Xcode question, it's a C question.
According to the C standard, the code should compile without problems.
Since it doesn't, it's a problem with Xcode.
testadd.c does not have a declaration of MyData in it, nor does it
include test.h. According to the C standard, that's a compilation
error. Xcode is not misbehaving in this instance.
What does the build transcript say? In the "Build Results" window,
click on the little button in the middle of the window with four lines
on it (right next to the button with the exclamation point) to show
the transcript, then copy-and-paste it into an email.
--
Mark Wagner
_______________________________________________
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
_______________________________________________
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