XCode10移除libstdc++的解决方案

最近在测试出包中,所以一直没有机会将问题写下来。

我们用的Unity版本很老。Unity4.7,打包的时候发现XCODE10无法打包出来,编译过程中老是会出现头文件缺失的情况。查了很久才发现,原来XCode10和之前版本删了一个库libstdc++,这就很好的解释了为什么之前打包会出现各种各样的头文件缺失了。

我们后来用了XCode9.4 发现可以正常编译。这更进一步证实了那个错误。

但是随着测试机型越来越多,我们惊讶的发现,XCode9.4不支持目前所有的IOS设备的。尤其是苹果今年新推的几款产品,用了A12芯片,无法用老版本打包了。

所以添加libstdc++,就变成了燃眉之急。

以下的方法我亲身测试过。所以想要分享给大家。

如果大家有老版本的XCode的话可以直接去复制。如果大家不想下载的话,那就直接到我的资源去下载。https://download.csdn.net/download/u011625767/11072049

至于如何去下载老版本的XCode的话,苹果官网就可以下载了。

具体链接https://developer.apple.com/download/more 

想要下载哪个下载哪个吧。

然后我们提供的资源有5个文件夹,大家挨个复制。就可以

将文件1内容添加到该路径中: (add the file 1 content into such path:)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

将文件2内容添加到该路径中: (add the file 2 content into such path:)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/

将文件3内容添加到该路径中: (add the file 3 content into such path:)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/

将命名为include的文件合并替换为文件4内容: (merge such the file which named “include” with the file 4 content:)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include

将命名为include的文件合并替换为文件5内容: : (merge such the file which named “include” with the file 5 content:)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值