从哪里获得 macOS SDK 10.6 for Xcode?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11989007/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where to get macos SDK 10.6 for Xcode?
提问by Umar Jamil
I am having Xcode 4.4
on OS X Lion. I'd like to install the Mac 10.6 SDK - also known as macosx10.7 SDK - because I need to compile openFrameworks.
我正在使用Xcode 4.4
OS X Lion。我想安装 Mac 10.6 SDK - 也称为 macosx10.7 SDK - 因为我需要编译 openFrameworks。
I found that I need to download additional tools from this site. However I didn't find any 10.6 SDK there. I also tried looking in Xcode Preferences -> Downloads -> Components, but there is no way.
我发现我需要从这个站点下载额外的工具。但是我没有在那里找到任何 10.6 SDK。我也尝试查看 Xcode Preferences -> Downloads -> Components,但没有办法。
I am wondering how can I install previous SDKs for Xcode?
我想知道如何为 Xcode 安装以前的 SDK?
回答by Rob Napier
Unfortunately, Apple tends to make this much harder than you'd like. You can't download SDKs by themselves. They come as part of specific versions of Xcode. So you have to download the right version of Xcode. Search for "10.6", and you'll see that you want Xcode 4.1.
不幸的是,Apple 往往使这件事比您希望的要困难得多。您无法自行下载 SDK。它们是 Xcode 特定版本的一部分。所以你必须下载正确版本的 Xcode。搜索“10.6”,您将看到您需要 Xcode 4.1。
Once you download that, you can install it (that version will go into /Developer, so it won't break your /Applications version), or you can open up the package and find the SDKs in it. If you don't know how to crack open these packages, just install it.
下载后,您可以安装它(该版本将进入 /Developer,因此它不会破坏您的 /Applications 版本),或者您可以打开包并在其中找到 SDK。如果您不知道如何破解这些软件包,请安装它。
Once you do that, search for "MacOSX10.6.sdk". I forget exactly where it is in that particular version.
完成后,搜索“MacOSX10.6.sdk”。我忘记了它在那个特定版本中的确切位置。
What I do at that point is copy the sdk into a /SDKs directory. That way I always have them all.
我当时所做的是将 sdk 复制到 /SDKs 目录中。这样我总是拥有它们。
Now, you need to add it to your current version of Xcode. You can do that by making symlinks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs. If you like, you can use my tiny link-sdksscript for that.
现在,您需要将它添加到您当前版本的 Xcode。您可以通过在 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs 中创建符号链接来实现。如果你愿意,你可以使用我的小链接 sdks脚本。
UPDATE: In modern versions of Xcode (7.3+) to use older SDKs edit MinimumSDKVersion
here:
更新:在现代版本的 Xcode (7.3+) 中使用旧版 SDKMinimumSDKVersion
在此处编辑:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
回答by tfmontague
All legacy MacOS SDKs can be found on GitHub - https://github.com/phracker/MacOSX-SDKs
所有旧版 MacOS SDK 都可以在 GitHub 上找到 - https://github.com/phracker/MacOSX-SDKs
回答by Rich
Somewhat off topic, but I hit a very similar problem trying to install Erlang using kerl.
有点偏离主题,但我在尝试使用kerl安装 Erlang 时遇到了一个非常相似的问题。
Everything worked for me until the "kerl build ..." step. The build log showed the following error:
一切都对我有用,直到“kerl build ...”步骤。构建日志显示以下错误:
odbcserver.c:117:10: fatal error: 'sql.h' file not found #include "sql.h"
The problem is that the ODBC is no longer part of the Mavericks installation(i.e., MacOS 10.6 SDK isn't installed). Piecing together advice from a variety of sites, none of which worked by themselves, the following set of steps fixed the issue:
问题是 ODBC 不再是 Mavericks 安装的一部分(即,未安装 MacOS 10.6 SDK)。将来自各种网站的建议拼凑起来,但没有一个是自己工作的,以下一组步骤解决了这个问题:
- brew install unixodbc- installs the missing ODBC libraries and include files (e.g., sql.h).
Set CFLAGS to point to the include directory for the unixodbc installation as part of the kerl build command (e.g.,):
CFLAGS="-I/usr/local/Cellar/unixodbc/2.3.2/include" ./kerl build R15B R15B
- brew install unixodbc- 安装缺少的 ODBC 库和包含文件(例如 sql.h)。
作为 kerl 构建命令的一部分,将 CFLAGS 设置为指向 unixodbc 安装的包含目录(例如):
CFLAGS="-I/usr/local/Cellar/unixodbc/2.3.2/include" ./kerl build R15B R15B
This points the build to the ODBC include files.
这将构建指向 ODBC 包含文件。
My environment is Mavericks, the xcode command line tools, and xcode v5.1.1.
我的环境是 Mavericks、xcode 命令行工具和 xcode v5.1.1。
回答by jesses.co.tt
If you search the openFrameworks forums, there are a few posts where people are providing download links from their public Dropbox folders, for example.
例如,如果您搜索openFrameworks 论坛,就会发现一些帖子中人们提供了来自其公共 Dropbox 文件夹的下载链接。
回答by Vladislav
Some SDK(with Xcode) you can download from direct links. List here: http://iphonesdkdev.blogspot.ru/2010/04/old-versions-of-iphone-sdk.html
您可以从直接链接下载一些 SDK(带有 Xcode)。在这里列出:http: //iphonesdkdev.blogspot.ru/2010/04/old-versions-of-iphone-sdk.html
Some don't work, but something you can still download. For example: http://adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
有些不工作,但你仍然可以下载的东西。例如:http: //adcdownload.apple.com/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg