Undefined symbols for architecture x86_64 when building for ARM64

耗尽温柔 提交于 2019-12-01 12:20:20
jww

how can I fix that?

Short answer: run . ./setenv-ios.sh x86_64 after downloading a new copy of the script. By default, setenv-ios.sh uses i386 for the simulator, and it did not support x86_64. The script now responds to x86_64, so fetch a new copy.

Based on @rmaddy's answer at Does Xcode 6 Simulator use x86_64?, it appears Xcode 6/iOS 8 SDK uses x86_64 for the simulator under some circumstances.

A new version of setenv-ios.sh was uploaded. It will respond to . ./setenv-ios.sh x86_64 by selecting the iPhoneSimulator.platform SDK using -arch x86_64 as a compiler option.

A new section covering this on the Crpyto++ wiki page for iOS (Command Line) was added. See the section Simulators, ARM64 and x86_64.

swallow

I solved this--- in short, it have to build with -stdlib=libstdc++ flag(to CXXFLAGS in GNUMAKEFILE) when building libcryptopp.

because my project is legacy cocos2d-x project, that's standard library is setted to libstdc++.

more infomation is here. jeffrey answered me about this in great detail.

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