gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:42:54 27 4
gpt4 key购买 nike

我刚刚为我的项目启用了 arm64 支持。以下是build设置(自项目开始以来仅粗体/修改):

> 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 (Sponsor-Pay)。我还使用以下方法检查了我的静态库 (.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 显示在编译/构建我的文件后最终构建失败。我在左 Pane 的错误/警告部分没有链接/编译时错误。虽然它显示了一些代码警告,但代码中的警告在启用 arm64 支持之前就已经存在。

最佳答案

多亏了我的哥们,我终于看到了错误。这是 XCode 中的某种错误。我做了以下步骤:

  1. 设置仅构建事件架构:是
  2. 连接具有 arm64 架构和操作系统的设备(iPhone 6 plus)
  3. 清理和构建
  4. 现在将向您显示错误
  5. 修复错误(尽管根据我的观察,这些错误以前在 32 位版本中不存在)
  6. 当您修复所有错误时设置仅构建事件架构:否
  7. 清理和构建
  8. 就是这样。完成

我希望这对其他人也有帮助。

关于c++ - xcode 6.x arm64 代码构建失败,没有任何编译或链接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30455480/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com