Unity3D 4.7.2导出的源代码在Xcode 9中运行完美。

相同的代码在最新的Xcode 10.1中给文件未找到错误

#include <algorithm> // Got error here saying file not found.

所以我只是将C++标准库更改为libc ++(LLVM C++标准库)

ios - Unity3D导出的源:无法识别c&#43;&#43;头文件-LMLPHP

更改之后,所有编译器错误都消失了。。。。

ios - Unity3D导出的源:无法识别c&#43;&#43;头文件-LMLPHP

如何解决这些错误?

最佳答案

如程序员建议的那样,libc ++已从Xcode 10中删除。

最简单的解决方法是从Xcode 9.4复制它

从复制C++

/Applications/Xcode9.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++到Xcode10的相同路径

同时复制libstdc ++。tbd,libstdc ++。6.tbd和libstdc ++。6.0.9.tbd
在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib中。

在“Xcode构建设置”中,将C++标准库保留为libstdc ++。

关于ios - Unity3D导出的源:无法识别c++头文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/53325326/

10-12 14:39
查看更多