Re: Xcode Compiling Against the Wrong SDK
Re: Xcode Compiling Against the Wrong SDK
- Subject: Re: Xcode Compiling Against the Wrong SDK
- From: Christiaan Hofman <email@hidden>
- Date: Sun, 7 Nov 2010 23:00:09 +0100
For the next time you have this problem, my guess is that you had the Active SDK set to 10.6. This is a project based user setting (AOT an Xcode user setting or a project/target setting). In recent Xcode versions it is very hard to figure this out, as it's hidden extremely well. You have to hold down Option and pop up the Overview toolbar popup button, or while holding down Option show the Project > Set Active SDK submenu, otherwise there is nowhere you can even see you are using a non-default setting.
BTW, this has been discussed a lot of time on this list by now. I personally think (therefore) that this is a serious design bug that should be revisited by the Xcode team ASAP (are you listening?). In short, when the setting is NOT the default "Use Base SDK", the setting should ALWAYS be shown, not just when you hold down the Option key. Hope this will be fixed soon, so we all don't have to waste a lot of time on this anymore. <rdar://problem/8640146>.
Christiaan
On Nov 7, 2010, at 20:41, Thomas Wetmore wrote:
> Gleb,
>
> Many thanks. I removed the .pbxuser file and now the compiler is using 10.6. Excellent!
>
> Tom Wetmore
>
> On Nov 7, 2010, at 2:32 PM, Gleb Dolgich wrote:
>
>> I had this problem just yesterday. I fixed it by going into .xcodeproj project file (Show Package Contents context menu item in Finder) and deleting all files except .pbxproj. I think in my case the old settings were cached in the .pbxuser file.
>>
>> Gleb Dolgich
>> PixelEspresso
>> http://www.pixelespressoapps.com
>>
>> On 7 Nov 2010, at 19:09, Thomas Wetmore wrote:
>>
>>> I am developing a Cocoa app where Xcode (3.2.4) runs the compiler with the following two (among all the other) command line options ...
>>>
>>> -isysroot /Developer/SDKs/MacOSX10.5.sdk
>>> -mmacosx-version-min=10.5
>>>
>>> Yet I believe I have all project and target settings set so the compiler should be using the 10.6 SDK. For example ...
>>>
>>> Architectures: Standard (32/64-bit Universal)
>>> Base SDK: Mac OS X 10.6
>>> C/C++ Compiler Version: GCC 4.2
>>> Mac OS X Deployment Target: Mac OS X 10.6
>>>
>>> The only settings I have modified from the default are:
>>>
>>> Library Search Paths: ... path to the directory with my static libraries
>>> User Header Search Paths: ... paths to two directories with the headers needed to use my static libraries ...
>>>
>>> Originally I posted a question to Cocoa-dev because the original symptoms I saw of this problem were compiler warnings about using NSTableViewDelegate as a protocol. In tracking this problem I learned that the pre-10.6 NSTableViewDelegate was a category and it became a protocol in 10.6. Since the compiler was using the 10.5 AppKit headers my use of the protocol was incorrect.
>>>
>>> I assume there is some other setting or interaction of settings that is causing Xcode to drop back to the 10.5 SDK for compling.
>>>
>>> As an experiment I created a new Cocoa application and built it immediately. It used the 10.6 SDK as expected. I then line by line compared both the project level settings and target level settings of that app to my offending app, and other than the search paths mentioned above, found the settings identical.
>>>
>>> Has anyone else seen this problem? I have "fixed" this by not using NSTableViewDelegate (and other delegates and data sources) as protocols, but I would like to get this cleaned up and understood.
>>>
>>> Thanks,
>>> Tom Wetmore, Chief Bottle Washer, DeadEnds Software
>>>
>>> _______________________________________________
>>> 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
>>
>
> _______________________________________________
> 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
_______________________________________________
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