Re: xcode 1.5 preprocessor
Re: xcode 1.5 preprocessor
- Subject: Re: xcode 1.5 preprocessor
- From: Bret Kurth <email@hidden>
- Date: Fri, 10 Sep 2004 14:32:39 -0500
In the Target build options there is a settings line item called
"Preprocessor Macros". The value is a text field where I had entered
"__unix". I know this was being automagically defined before as
preprocessor conditional code in a header file for different platforms
was correctly defined based off the state of my macro. Simply updating
the project to xcode 1.5 caused the preprocessor conditional code to be
defined incorrectly because "__unix" no longer gets defined. i.e:
#ifdef __unix
#define DLLOPT
#else
#define DLLOPT __declspec(dllexport) (something that wont naturally
compile on a mac)
#endif
class DLLOPT foo {
public:
}
Again this worked using XCode 1.2. Note I did not change versions of
GCC. When the compiler hits the class definition of foo, it sees the
__declspec(dllexport) garbage in front of the class name implying that
"__unix" is not defined for the scope that file and subsequently
chokes.
Bret
On Sep 10, 2004, at 2:17 PM, Fritz Anderson wrote:
Could you clarify? You don't say how you are defining that macro, and
I even get the sense you may expect it to be defined automatically.
How did you define it before? What specifically leads you to believe
it is not defined now?
-- F
On 10 Sep 2004, at 12:44 PM, Bret Kurth wrote:
I have a project that I just converted from XCode 1.2 to XCode 1.5.
Simple migration but I'm running into a problem. One target in the
project has the following preprocessor macro defined: __unix
This is not being defined when building the target even after
cleaning and rebuilding. Do I need to make a modification to how
this is defined or what gives?
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.