问题
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