Re: PCH not being used
Re: PCH not being used
- Subject: Re: PCH not being used
- From: Burt Johnson <email@hidden>
- Date: Sun, 22 Jan 2006 13:53:37 -0800
>I think the problem is that the pch file is a precompiled header.
>Since it's pre-compiled, any pre-compiler macros or definitions you
>put in it will be gone by the time you compile the rest of your code.
>You need to create a new header file (perhaps windefs.h?) with the
>definitions you need and then #import those into any code that will
>need them. The .pch file is just not the right place to put this.
Oh? I thought that would just be used for all files.
Thanks for the clarification. I just made a quick test, and putting it
into a global Win.h does make it respond as expected.
However, I am now a bit confused by a related issue. My new global header
defines a structure that is used a lot. To understand the elements, I need
to '#import "DataHelpers.h"' from within this new Win.h.
When I do that, I get the following error:
/Users/bj/FitSync/CommonCode/DataHelpers.h:6: error: cannot find interface
declaration for 'NSObject', superclass of 'DataHelpers'
I thought everything in ObjC inherited from NSObject. If so, I would
assume that all of ObjC automatically knows about this class. Note that my
pch file now has only the default code:
>>>>>>>>>>>>>
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
<<<<<<<<<<<<<
That should be sucking in NSObject, shouldn't it? And if it isn't, that
seems to imply that the pch isn't connected properly for some reason. (As
a reminder, I used the wizard for "cocoa application", which I believed
would establish these connections)
--
- Burt Johnson
MindStorm, Inc.
email@hidden
http://www.mindstorm-inc.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden