我刚为项目启用了arm64支持。以下是构建设置(自项目启动以来仅加粗/修改):
> Architectures:
Architectures: Standard Architectures (armv7, arm64) - $(ARCHS_STANDARD)
Base SDK: Latest iOS (iOS 8.3)
Build Active Architecture Only: NO
Supported Platforms: iOS
Valid Architectures: armv7 armv7s arm64
> Build Options
Validate Built Product: Yes
> Deployment
Strip Debug Symbols: Druing Copy: No
> Linking
Other Linker Flags: -lxml2 -lz -ObjC
> Packaging
Compress PNG Files: No
Info.plist File: <project_name>/Info.plist
Wrapper Extension: app
> Apple LLVM 6.1 - Code Generation
Generate Position-Dependent Code: No
Optimization Level: None [-O0]
> Apple LLVM 6.1 - Language
Precompile Prefix Header: Yes
Prefix Header: <project_name>/Prefix.pch
> Apple LLVM 6.1 - Preprocessing
Preprocessor Macros:
Debug: DEBUG COCOS2D_DEBUG=1 CC_TARGET_OS_IPHONE USE_FILE32API APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
Distribution: NDEBUG USE_FILE32API CC_TARGET_OS_IPHONE APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
Release: NDEBUG USE_FILE32API CC_TARGET_OS_IPHONE APP_TARGET=1 CC_ENABLE_CHIPMUNK_INTEGRATION
> Interface Builder NIB Postprocessor - Options
Strip NIB Files: No
我的项目使用的是cocos2dx 2.2.6,包括Chartboost,Apsalar,Flurry,Tapjoy和Fyber(赞助商付费)。我还使用以下方法检查了64位suppport的静态库(.a)文件:
xcrun -sdk iphoneos lipo -info ./<project_path>/libs/cocos2dx/platform/third_party/ios/libraries/libwebp.a
Architectures in the fat file: ./<project_path>/libs/cocos2dx/platform/third_party/ios/libraries/libwebp.a are: i386 armv7 armv7s x86_64 arm64
我的所有静态库(.a)文件都显示arm64,这意味着它们支持64位构建和打包。
现在当我尝试构建我的代码(模拟器/设备)时,xcode在编译/构建我的文件后最终显示构建失败。我在左窗格的错误/警告部分没有链接/编译时错误。虽然它显示了一些代码警告,但在启用arm64支持之前,代码中存在警告。
答案 0 :(得分:4)
感谢我的好友,我终于设法看到了错误。它是XCode中的某种错误。我做了以下步骤:
我希望这也可以帮助别人。