• 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: external declares
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: external declares


  • Subject: Re: external declares
  • From: Wes Peterson <email@hidden>
  • Date: Sat, 11 Feb 2006 12:23:09 -1000

May I inject myself into this? I have two questions for which
clear simple answers would be a great help.
1) Exactly what is XCode, (and what isn't)? I installed the
developer tools on my Mac and I got a lot of things, including
the development environment, gcc and the linker, and also
a lot of libraries, including at least Cocoa, which I am
interested in. My first idea was that all of this is XCode,
but that seems not to be the case and it is not clear.

2) This may not be XCode, but I would appreciate any insight
or good pointers to where to get it. I have been using C since
before the 1988 standard was adopted. Then the rules were very
clear. Every variable and function must be defined exactly once
in a program and declared (or defined) in every module in which
it is used. So for external variables, you had to have an extern
statement in each module before the variable is used and a
definition exactly once in the whole program. Recently I
downloaded the 1999 standard and read it carefully, and as
closely as I could tell, nothing has changed. It used to be that
if you put a definition for an external variable in an include
file and include it in more than one module, you get a multiply-
defined variable message. Recently, I see programs in which
external variables are defined in include files and included
multiple times and the program works fine. Sometimes when I
try that it works and sometimes it doesn't. I don't understand
the rules. I do use three compilers now--gcc on my Mac, gcc on
a Sun unix server, and Visual C++. I am not sure whether they
all treat this the same way or not. Fundamentally, I would like
to know the exact rules for external variables. It would be very
helpful to me. I think that this may be Robert's problem, too.
--Wes _______________________________________________
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
  • Follow-Ups:
    • Re: external declares
      • From: Charlton Wilbur <email@hidden>
References: 
 >external declares (From: Robert Dell <email@hidden>)
 >Re: external declares (From: Charlton Wilbur <email@hidden>)
 >Re: external declares (From: Robert Dell <email@hidden>)
 >Re: external declares (From: Charlton Wilbur <email@hidden>)

  • Prev by Date: Re: external declares
  • Next by Date: Re: Universal binary problem: ... cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
  • Previous by thread: Re: external declares
  • Next by thread: Re: external declares
  • Index(es):
    • Date
    • Thread