On Feb 17, 2006, at 3:47 PM, Stephen Chu wrote: On Oct 17, 2005, at 3:09 PM, Stephen Chu wrote:
On Oct 17, 2005, at 1:24 PM, Chris Espinosa wrote:
On Oct 17, 2005, at 9:35 AM, Stephen Chu wrote:
I was in the middle of debugging my project and try to rebuild the target. All of sudden XCode spitted out hundreds of errors complaining about not being able to find most of my source files.
It turned out it doesn't recognize any of my source trees any more.
For example, I have MoreFilesX.c at "/Dev Tools/MoreFilesX/MoreFilesX.c" and was added relative to a source tree DevTools defined as "/Dev Tools". The get info on the file says "../Dev Tools/MoreFilesX/MoreFilesX.c". Double-clicking at it in project window opens the file. But gcc can't find it.
What's happening???
Source trees are stored in your user preferences file. Did you switch users? If you go to Xcode Preferences, Source Trees, is DevTools still there?
Chris
It's all there. But I just noticed that all the space characters in the path are now escaped. "/Dev Tools" became "/Dev\ Tools". I've been using 2.2DP2 and it's been working before this morning in the middle of a rebuild. Reinstalled 2.1 and retyped all the source tree paths and readded all my source files fixed it. Needless to say, this is painful.
Any why isn't there a button or something to navigate to the directory instead of having us manually type in all the paths???
WTF is going on? I have the source trees working even after upgrade to 2.2. I have to add a new one and all the existing paths are escaped. Now none of the paths work and needless to say, none of my projects works.
What is it with Apple? Do they even have a clue? Yes, I am pissed.
Did you read the Xcode 2.2 Release Notes, Known Issues and Workarounds, where it says:
"Spaces in Project Path Items Any build setting that contains a path (or includes another build setting that resolves to a path) must be enclosed in double quotes if the path is likely to contain a space character. Xcode will handle the quoted value correctly, but will fail if an unquoted value resolves to a path that includes a space."
We know it's a problem; it was introduced by work we did to reduce merge conflicts in project files. We are working on a fix, but won't roll out one until we find a technique that's both reliable and backwards compatible with the existing 2.2 behavior. For now, providing paths that look like
"$(MOREFILES)/MoreFilesX/"
is the most reliable way.
If you need to bulk-change paths like this, you can open the foo.xcodeproj/project.pbxproj file in TextEdit, BBEdit, etc. and do search-and-replace rather than use the target inspector to add this quoting. (I always recommend making a backup of your project file before hand-editing it.)
Regards,
Chris |