Unity3D exported source : c++ header files not recognised

混江龙づ霸主 提交于 2019-12-11 09:39:38

问题


Unity3D 4.7.2 exported source worked perfect in Xcode 9.

Same code gave file not found error in latest Xcode 10.1

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

So I just changed C++ Standard Library to libc++(LLVM C++ standard library)

After this change all compiler errors gone.... got lots of linker error for c++

How to solve these errors ?


回答1:


As Programmer suggested, libc++ removed from Xcode 10.

Simplest work around is to copy it from Xcode 9.4

Copy c++ from

/Applications/Xcode9.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/c++  to Xcode10 the same path

Also copy libstdc++.tbd, libstdc++.6.tbd and libstdc++.6.0.9.tbd in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib.

In Xcode Build Settings, keep C++ Standard Library as libstdc++.



来源:https://stackoverflow.com/questions/53325326/unity3d-exported-source-c-header-files-not-recognised

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!