为了账号安全,请及时绑定邮箱和手机立即绑定

我们如何恢复ppc / ppc64以及对Xcode 4的完整10.4 / 10.5 SDK支持?

我们如何恢复ppc / ppc64以及对Xcode 4的完整10.4 / 10.5 SDK支持?

繁星淼淼 2019-09-18 19:38:28
由于Apple只发布带有Xcode4的SDK 10.6,因此用Xcode4开发PPC应用程序变得不可能。虽然可以使用Xcode4开发应用程序,也可以在10.5甚至10.4系统上运行(通过选择SDK 10.6,但部署目标10.5或10.4),它们只能在Intel Mac上运行,因为您至少需要SDK 10.5才能运行构建PPC应用程序。此外,还有一些罕见的情况,您需要在10.6之前构建一个SDK以获得完整的平台支持,例如,如果某些已弃用的功能已完全从10.6 SDK中消失,但您必须使用它并且动态链接不是在这些情况下总是最好的选择。同时链接早期的SDK有时会使开发变得简单,因为它会导致与早期操作系统版本不兼容,因为它会导致与早期操作系统版本不兼容,并且任何尝试使用它无论如何都会立即导致编译器或链接器错误。最后但并非最不重要的是Apple还从Xcode4中删除了GCC 4.0支持,这可能是某些软件正确构建所必需的,Apple在使用SDK 10.4时从未允许使用GCC 4.2编译软件,尽管我几乎不相信这会导致任何问题,毕竟使用GCC 4.2和SDK 10.6构建的软件也可以在Mac OS 10.4上运行而没有任何问题,只要已正确设置部署目标并且没有使用MacOS 10.4下不可用的功能。当然,你总是可以在Xcode4旁边并行安装Xcode3,但这意味着你必须放弃Xcode4的所有(伟大的?)新功能,并继续使用过时的Xcode3 IDE。如果您还可以在同一个IDE中管理所有旧项目,并且可以使用任何新功能,那肯定会好得多。并非所有项目都可以在可预见的将来制作10.6或英特尔。此外,我严格反对在早期实际需要之前取消对旧平台的支持。我们可以将此功能恢复到Xcode4吗?
查看完整描述

3 回答

?
慕容708150

TA贡献1831条经验 获得超4个赞

只有Xcode4的另一种简单方法,不再需要Xcode3。


$ sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /Developer/usr/libexec/gcc/darwin

$ sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /usr/libexec/gcc/darwin

EDITS:


对于Xcode 4.1,


sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /Developer/usr/libexec/gcc/darwin

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/ppc /usr/libexec/gcc/darwin

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-cpp-4.2.1 /usr/bin/powerpc-apple-darwin11-cpp-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-gcc-4.2.1 /usr/bin/powerpc-apple-darwin11-gcc-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-g++-4.2.1 /usr/bin/powerpc-apple-darwin11-g++-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-cpp-4.2.1 /Developer/usr/bin/powerpc-apple-darwin11-cpp-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-gcc-4.2.1 /Developer/usr/bin/powerpc-apple-darwin11-gcc-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/powerpc-apple-darwin10-g++-4.2.1 /Developer/usr/bin/powerpc-apple-darwin11-g++-4.2.1

sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/lib/gcc/powerpc-apple-darwin10 /Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc

您只能将Gcc-4.2用于PowerPC。并且“-isysroot /Developer/SDKs/MacOSX10.6.sdk”选项是必需的,因为10.7 SDK不再支持PowerPC。


查看完整回答
反对 回复 2019-09-18
  • 3 回答
  • 0 关注
  • 464 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信