xcode 6.X arm64代码构建失败,没有任何编译或链接错误



我刚刚为我的项目启用了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(赞助商支付)。我还检查了我的静态库(.a)文件是否支持64位,使用:

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支持之前,代码中的警告就已经存在了。

多亏了我的朋友,我终于看到了错误。这是XCode中的一些bug。我执行了以下步骤:

  1. 设置仅构建活动架构:是
  2. 连接arm64架构和操作系统的设备(iPhone 6 plus)
  3. 清洁,构建
  4. 现在错误将显示给你
  5. 修复错误(尽管在我的观察中这些错误在32位构建之前不存在)
  6. 当你修复了所有的错误设置Build Active Architecture Only: No
  7. 清洁,构建
  8. 就是这样。完成了

最新更新