• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ghost .h file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ghost .h file


  • Subject: ghost .h file
  • From: Scott F Bayes <email@hidden>
  • Date: Tue, 10 Apr 2007 18:18:02 +0900

Hi Xcoders,

I am having a problem with a Cocoa App project I started today - one of my .h files seems to be wrapped around the axle inside the .xcodeproj and is being mishandled by XCode. I've looked in the list archives and in XCode help, but nothing seems to match.

It's "Coin.h". During build, XCode 2.4.1 on OS X 10.4.9 complains about some syntactic problem that probably was there at some point. "Coin.h" is imported by its own .m and by another .h, in both cases using #import, not #include.

When it started seeming weird, can't remember now how it was weird except that fixing the .h fie didn't cause the error message to go away, I deleted "Coin.h" from the project, but left the file intact. Then I tried to add it back in: it shows up grayed out in the dialog, as if it were already in the project. But it's not in Groups & Files underClasses, Other Sources, Resources or Frameworks (to the first level). So it's not in the project seemingly, though it's still #import-able, but it'll be hard to maintain in Subversion if I have to special case it for check-in. BTW, I haven't submitted it to Subversion yet, it was still very early stages when I encountered the problem.

More weirdness: now the build Message area shows a number of errors and warnings, the first 4 of which are an error and a warning in each of "Coin.h" and "coin.h" - case is significant, because there ain't no "coin.h" in the folder, just a "Coin.h". 

Weirder: I double-click the first one, an error in "coin.h" (followed in the list by the same error in "Coin.h"), and it opens "Coin.h", not "coin.h", in which my admittedly newbie eyes see nothing wrong. But looking back at the messages list, the second message says its error is now in "Coin.m" at line 1, not in "Coin.h" where it first appeared. Line 1 of "Coin.m" is indeed the #import "Coin.h" line, so that kind of makes sense.

Anyway, I've looked inside the .pbuser file in the .xcodeproj/ package .and lines like "fRef = 423235C80BCB78CC00C5FD7A /* coin.h */;" abound. I guess they could be there for normal reasons, like XCode not bothering to rewrite the file after unlinking it from the data structure, but it seems suspicious given the other symptoms.

Anyway, upshot is I can't build what appears should be a quite buildable source, and am currently firmly wedged. I guess I'll try to move the .nib and source files into a new project tomorrow, after seeing if the collective wisdom has any help for me.

1) Can anyone advise me on how to get this .h and project files under control? Or is my plan of attaching the source to a new project the right way?

2) If this happens again after the project starts to get complex, I'm afraid that it may be non-trivial to re-host in a new project. Anyone know what might have caused the problem, so I can avoid it in future?

Many thanks,

ScottB
 _______________________________________________
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

  • Prev by Date: Re: user-specific build variables?
  • Next by Date: Application Icon
  • Previous by thread: Re: Per-configuration output name?
  • Next by thread: Application Icon
  • Index(es):
    • Date
    • Thread