Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 2.1 header paths, source trees, and quotes




On Jun 7, 2005, at 1:27 AM, Scott Lahteine wrote:

Hi,

I have a number of header search paths in my project that worked up until Xcode 2.0 but seem to have been broken by Xcode 2.1. They refer to source trees by name, and since the directories referred to by the source tree references have spaces in them I've included quotes in the header paths. So in order to work they need to look *exactly* like this in the Header Search Paths setting:

    "$(SpriteWorld)/BlitPixie/Headers"

Without the quotes all versions of Xcode put this sort of thing in the compiler command-line in place of a single -I path:

-I/Users/ubergeek/Projects/DEVELOPER/_API_SDK/SpriteWorld -I3/ SpriteWorld -IFiles/BlitPixie/Headers


Problem #1:
When the paths are specified as above in the Target properties then the build succeeds. However they are completely ignored when I include them in the Project properties.

Make sure you don't have an empty "Header Search Paths" setting in the target build settings. If the "Headers Search Paths" build setting is bold in the target build settings, but the value is empty, then you have the header search paths set to "" at the target level.

Problem #2:
I tried editing the search paths using the "Edit" button in the Build properties window and including the quotes in each field. But when I do that the quotes are \"escaped\" when placed into the build properties and also subsequently in the gcc compile command. This causes the quotes to be taken literally and it breaks the compile.

I don't think you need to put the quotes in when entering the items through the edit sheet.



Problem #3:
Even though I've entered the search paths by typing them exactly as I've shown above, when I close the project and reopen it the quotes in my search paths are automatically removed by Xcode 2.1. No prior version of Xcode did this.

Yes, you have run into a known bug in Xcode 2.1 :(


I thought perhaps the use of quotes was no longer a supported method of protecting spaces in pathnames, so I tried escaping the spaces in the paths of the global Source Trees. However Xcode escapes the backslashes in the Source Tree path when handing it to gcc and then the compile breaks even more creatively:


For the -I parts gcc gets this passed to it, and the quote placement seems wrong to me:

"-I/Users/ubergeek/Projects/DEVELOPER/_API_SDK/SpriteWorld 3/ SpriteWorld Files/BlitPixie/Headers"

And for the -c parts (yep, I have file groups in my project that are source-tree relative too) gcc gets this:

-c "/Users/ubergeek/Projects/DEVELOPER/_API_SDK/SpriteWorld\\ 3/ SpriteWorld\\ Files/Sources/Sprite.c"


Am I missing something, or does this represent a bug in Xcode 2.1?

At least #3 is a known bug in Xcode 2.1, not sure about #1 and #2.

Scott



--
  Scott Lahteine
  Thinkyhead Software

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >XCode 2.1 header paths, source trees, and quotes (From: Scott Lahteine <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.