Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Precompiled Headers and gcc 3.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Precompiled Headers and gcc 3.3



On Thursday, June 26, 2003, at 07:36 PM, Devang Patel wrote:

OK. If you've gone this far then let's debug this.

- Add compiler option -Winvalid-pch in OTHER_CFLAGS. GCC will emit info. about PCH validation. This will help to investigate why GCC is not using *.gch.

OK, this helps. It turns out the pre-comps weren't being used because I built them without debugging symbols, and I was building a target that did have debugging symbols turned on. Also, I found that Carbon & friends have to have pre-comps available for C, C++, and Objective-C or else GCC may ignore them (I was building C pre-comps for Carbon, and I apparently need to build Objective-C pre-comps in order to use Carbon in Objective-C source files).

Now I see that GCC 3.3 does support sets of pre-compiled headers, which straightens out some of these issues, but now, there's one thing I can't figure out... Now I'm seeing the following warning appear:

Controller.h:9:26: warning: /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h.gch: not used because `ABS' is defined

Huh? Why would a #define macro (from NSObjCRuntime.h) throw this off, and what can I do about this? In some source files, it's also complaing about a -DDEBUG definition I threw into one build style's OTHER_CFLAGS, saying the pre-comp is "not used because `DEBUG' is defined". What can I do about these?

- In terminal use 'file' command to check file type of *.gch. What does it say?

% file /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h.gch
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h.gch: data

- Where did you put .gch files ?

It says in the documentation to put the .gch files in the same directory as the rest of the headers, so that's what I've done.

Once I get the remaining issue straightened out, I'll post my shell script so others can benefit from it until we can all get Xcode...

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://dreamless.home.attbi.com/

"You can't modify a constant, float upstream, win an argument with the IRS, or satisfy this compiler" - actual MPW 68K compiler error message
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: Precompiled Headers and gcc 3.3 (From: Devang Patel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.