Re: Xcode 2.3 Wrong Headers [Found Bug]
Re: Xcode 2.3 Wrong Headers [Found Bug]
- Subject: Re: Xcode 2.3 Wrong Headers [Found Bug]
- From: email@hidden
- Date: Sat, 17 Jun 2006 13:46:33 -0400
On 17 Jun 2006, at 5:33 AM, email@hidden wrote:
I am creating a dynamic library.
Along with the code that compiles to the library, I have example
code to be built into various command line tools and Cocoa
applications.
Thus, I created an Empty Project and then proceeded to add the
various targets.
I added the dylib target; after much ado, I got it to compile.
I added the command line tool target; after much more ado, I got it
to compile.
I added the Cocoa application target; hell broke loose.
1) The damned thing was trying to precompile headers, but it
complained with 2000 errors about not being able to find various
definitions in headers that weren't included in any one of the
Cocoa Application source files. I examined every setting in the
inspector with the corresponding setting in another, working Cocoa
Application project; everything was virtually identical. I finally
removed from the project all headers and sources that weren't
explicitly included in the troublesome Cocoa App target, and voila!
The Cocoa App target precompiled headers, and then compiled and
successfully ran it's own code; thus, it would seem precompilation
is to blame, particularly because I don't specify a prefix header.
2) After turning off precompilation, and making sure the Cocoa App
target still worked, I included all the other source (for the dylib
and command line tool targets). I didn't even mark those files as
being used in their respective targets; I just added them to the
project. Press build.
GASP!
To my horror, the errors flew back into my face. And you know what?
They were the same damn errors (almost) as when precompiling. The
compiler couldn't find headers included in other headers that
weren't even touched by my Cocoa App target source. In fact, it
get's weirder, as apparently my code is in Apple's:
In file included from /System/Library/Frameworks/
CoreFoundation.framework/Headers/CoreFoundation.h:16,
from /System/Library/Frameworks/
Foundation.framework/Headers/Foundation.h:6,
from /System/Library/Frameworks/AppKit.framework/
Headers/AppKit.h:10:
/Path/To/My/HeaderThatHasNothingToDoWithThisCocoaApp.h:17:17:
error: gmp.h: No such file or directory
...Various Errors in my HeaderThatHasNothingToDoWithThisCocoaApp.h,
which make sense given the unfound gmp.h...
Do keep in mind that HeaderThatHasNothingToDoWithThisCocoaApp.h is
not used in the CocoaApp Target at all; it is merely present in the
project
3) So, at this point, I'm at a loss. Please let me know what to do.
Thank You Kindly.
I've found the error... It's very strange.
Add a file named Float.h (actually, case doesn't matter, at least on
HFS+) to the project. Then put any code that won't compile into it.
For some reason Xcode includes this file anyway, even if you don't
include it in source files or targets.
Only when it ends with .h does it seem to show this trouble.
Thanks.
I'll report a bug.
_______________________________________________
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