Re: #define bug in gcc for delta builds?
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