首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >架构armv7的未定义符号-使用xcode6.0.1和cocos2d-x3.2

架构armv7的未定义符号-使用xcode6.0.1和cocos2d-x3.2
EN

Stack Overflow用户
提问于 2014-10-12 20:24:57
回答 2查看 1.8K关注 0票数 0

当我选择"Build Active Architecture Only“= "YES”时,我可以在我的设备上运行该项目。但当我选择"NO“时,它显示同一个项目有200多个错误。

我选择了标准架构(armv7,arm64)作为这个项目的架构,选择了arm64,armv7,armv7s作为这个项目的有效架构。

以下是我收到的错误的一部分:

代码语言:javascript
复制
ld: warning: ld: warning: ignoring file /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libbox2d iOS.a, file was built for archive which is not the architecture being linked (armv7): /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libbox2d iOS.aignoring file /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libchipmunk iOS.a, file was built for archive which is not the architecture being linked (armv7): /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libchipmunk iOS.a

ld: warning: ignoring file /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libcocos2dx-extensions iOS.a, file was built for archive which is not the architecture being linked (armv7): /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libcocos2dx-extensions iOS.a
ld: warning: ignoring file /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libCocosDenshion iOS.a, file was built for archive which is not the architecture being linked (armv7): /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libCocosDenshion iOS.a
ld: warning: ignoring file /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libcocos2dx iOS.a, file was built for archive which is not the architecture being linked (armv7): /Users/john/Library/Developer/Xcode/DerivedData/Hero-hbrtqluudvdwemgbwcyacbfeysqv/Build/Products/Debug-iphoneos/libcocos2dx iOS.a

Undefined symbols for architecture armv7:
  "cocos2d::Touch::getLocation() const", referenced from:
  Credits::onTouchBegan(cocos2d::Touch*, cocos2d::Event*) in Credits.o
  Credits::onTouchMoved(cocos2d::Touch*, cocos2d::Event*) in Credits.o
  "cocos2d::MoveTo::create(float, cocos2d::Vec2 const&)", referenced from:
  Credits::resetCreditAction() in Credits.o
  "cocos2d::CallFunc::create(std::__1::function<void ()> const&)", referenced from:
  Credits::resetCreditAction() in Credits.o
  "cocos2d::Application::setAnimationInterval(double)", referenced from:
  vtable for AppDelegate in AppDelegate.o
  "cocos2d::Director::runWithScene(cocos2d::Scene*)", referenced from:
  AppDelegate::applicationDidFinishLaunching() in AppDelegate.o
  "cocos2d::Application::~Application()", referenced from:
  AppDelegate::~AppDelegate() in AppDelegate.o
  "cocos2d::Application::Application()", referenced from:
  AppDelegate::AppDelegate() in AppDelegate.o
EN

回答 2

Stack Overflow用户

发布于 2014-10-14 17:40:11

仅在游戏和cocos2d-x项目的有效架构和架构部分添加armv7和armv7s。(在项目和目标剖面构建设置中)

票数 1
EN

Stack Overflow用户

发布于 2015-08-09 06:04:46

我已经通过在我的Cocos2d-x 3.7项目中使用以下设置修复了这个问题。

  • 在Xcode中选择您的顶级项目(在本例中,'ZooCubes')
  • Set iOS部署目标设置为"iOS 7“
  • 将有效架构设置为:"arm64 arm7”
  • 还确保将架构设置为“iOS architectures arm7,arm64"

请确保对cocos2d_libs.xcodeproj重复此过程

有时,当一个类引用了一个缺失的框架时,同样的错误消息也会显示出来。在我的例子中,我必须添加GameKit框架,因为我的一个类正在尝试引用它。

最后,我还遇到了这样的情况(例如,在cocos2dx-2.2.6中创建一个新项目),所有目标的"Build Active Architecture Only“选项都需要设置为”No“,以便修复”Undefined symbols“错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26325096

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档