• 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: #define bug in gcc for delta builds?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #define bug in gcc for delta builds?


  • Subject: Re: #define bug in gcc for delta builds?
  • From: Stephen Northcott <email@hidden>
  • Date: Wed, 4 Feb 2009 18:44:44 +0700

Hi Steve,

But yes, it is referenced in more than one place.

When you say referenced, do you mean #included?

Yes.

Actually, that would create multiple externally visible symbols with the same name and that would cause an error at link time. Since you are using c++, there was always the possibility that you were including it inside different namespaces.

Not getting any errors. So I am little confused by that. There is no namespace issue here either AFAIK.
Are we getting crossed lines here. Its the #define that is in effect redefined (if anything), not an actual variable.


Just to make sure, you're not accidentally using #ifdef in one and #ifndef in the other, are you?

He he. No. But I did check again just in case!! And it did occur to me too, earlier today!


Hi Matt,

if you declare globals this way, aren't they unique to each compilation unit?

i.e if bar.cpp and roo.cpp both #include foo.h then they both refer to globals called A but they are in different locations (and hence not the same A)

I don't think so.

Like I said the #define is in foo.h and only ever used in foo.cpp and foo.h. foo.cpp includes foo.h. And any where else that the class in foo is used I also include the same foo.h

Kind regards,
Stephen.
_______________________________________________
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: #define bug in gcc for delta builds?
      • From: Ken Thomases <email@hidden>
    • Re: #define bug in gcc for delta builds?
      • From: Steve Checkoway <email@hidden>
References: 
 >#define bug in gcc for delta builds? (From: Stephen Northcott <email@hidden>)
 >Re: #define bug in gcc for delta builds? (From: Steve Checkoway <email@hidden>)
 >Re: #define bug in gcc for delta builds? (From: Stephen Northcott <email@hidden>)
 >Re: #define bug in gcc for delta builds? (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: XCode built project crash related to .o files and p_threads?
  • Next by Date: Re: #define bug in gcc for delta builds?
  • Previous by thread: Re: #define bug in gcc for delta builds?
  • Next by thread: Re: #define bug in gcc for delta builds?
  • Index(es):
    • Date
    • Thread