38

I've installed xCode 4 last night and tried to compile a software which should support 10.5 and above OSs.

It gave the error message "Base SDK missing". I found that 10.5 base SDK is no longer in the menu.

Is there any way to get that base SDK? Is there any get around for this problem?

Thanks in advance.

Falko
  • 17,076
  • 13
  • 60
  • 105
Raiyan Kabir
  • 1,016
  • 2
  • 11
  • 23

2 Answers2

58

Dropping the 10.5 SDK is also a problem for software which does not use Xcode for the build system, but expects (perhaps foolishly) for specific SDKs to be in place.

To add the SDK back, I re-installed the MacOSX10.5.pkg from the Xcode 3.2.6 download. It is in a hidden folder named "Packages" on the disk image. After mounting the .dmg file, you can open it from the command line with open /Volumes/Xcode\ and\ iOS\ SDK/Packages/. When installing the package, choose change install location and option-click on the drive you want to install to, so that you can specify a folder. The target folder should be /Developer or the base of your Xcode 4 install if you have put it in a non-standard location.

Nic Benders
  • 761
  • 7
  • 4
  • 7
    Notes for those who try this: • The Packages directory is hidden, open the disk image and use "Go to Folder" from the "Go" menu (command-shift-G) to open it from the Finder. • When you run the SDK installer PKGs, they will install to /SDKs, not /Developer/SDKs, so you will have to move them. (You will have to authenticate as the installer sets permissions read-only.) See also [this page](http://hints.macworld.com/article.php?story=20110318050811544). – Ethan Jun 28 '11 at 00:08
  • I've upgraded to Lion and newest Xcode, because Apple made me! And so this was necessary so i could build android! Thanks! – Sander Versluys Aug 03 '11 at 21:50
  • I would give you 500 upvotes if I could for this. You just made the installation of ARToolkit possible for me ^_^ – erik Feb 06 '12 at 19:54
  • 5
    Xcode 3.2.6 can be [found in downloads](https://developer.apple.com/downloads/index.action?searchTextField=3.2.6) on apple site. You need to be registered. – tig Mar 27 '12 at 19:18
14

You can copy it from another Xcode installation into the /YourDeveloperFolder/SDKs/... but Xcode 4 still will not build Universal (Intel/PPC) binaries, essentially making it all but pointless to use the 10.5 SDK (except for "this method doesn't exist yet" style warnings). The official word from Apple (via their devforums): If you need 10.5/PPC support, stick with Xcode 3.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
  • Do not do this or encourage other people to do this; forcing the IDE to use an SDK that is not distributed with it and that it is not qualified against is not supported. – Chris Hanson Mar 23 '11 at 08:56
  • 13
    I hardly think my answer was "encouragement" to do it. In fact, it contained three reasons why you shouldn't. That doesn't mean the question should be ignored. Best to answer it with reality so others can *learn* from it. Lack of information is as bad as misinformation. Was the down-vote really necessary, given the answer is correct *and* contains warnings? – Joshua Nozzi Mar 23 '11 at 11:15
  • It's also worth noting, now that I think about it, that the 10.5 SDK was shipped with Xcode betas all the way to Developer Preview 6 (or was it the first GM?). It worked just fine. – Joshua Nozzi Mar 23 '11 at 13:38
  • 3
    Might want to elaborate here on what you mean by copy. In fact, I created a soft link to /Developer_for_XCode_3/SDKs/MacOSX10.5.sdk in /Developer_for_XCode_4/SDKs. – Raffi Khatchadourian Apr 26 '11 at 05:30
  • 1
    I meant what I said but a soft link would in fact work just as well. – Joshua Nozzi Oct 18 '11 at 00:13
  • This comes in handy if you want to build your app with the 5.1 SDK just to see if you have any iOS 6-only code in it. Set the Base SDK to 5.1 and try and compile, and look for warnings. – Owen Hartnett Nov 29 '12 at 15:23