XCode 5.1 强制对 Cocos2d-iphone v3 项目进行 32 位编译

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22363266/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:45:18  来源:igfitidea点击:

XCode 5.1 force 32 bit compilation for a Cocos2d-iphone v3 project

iosxcodespritebuilder

提问by Tibor Udvari

I am using SpriteBuilderwith Cocos2d-iphone v3.

我正在使用SpriteBuilderCocos2d-iphone v3。

Ever since updating to XCode 5.1 my application crashes when I use CCButtonactions defined directly in SpriteBuilder. This seems to be the cause

自从升级到5.1的XCode,当我用我的应用程序崩溃,CCButton直接在定义的操作SpriteBuilder。这似乎是原因

This is most likely a cast or pointer conversion, going bad on 64 bit.

这很可能是强制转换或指针转换,在 64 位上会出错。

as pointed out by @birkemose at the Cocos2d forums

正如@birkemose 在Cocos2d 论坛上指出的那样

How can I force XCode 5.1 to compile my project in 32 biteven for my 64 bit devices?

即使对于我的 64 位设备,如何强制 XCode 5.1 以32 位编译我的项目?

Update: Fix by updating Cocos2d to RC4

更新:通过将 Cocos2d 更新到 RC4 来修复

xCode 5.1 build crashes - SpriteBuilder

xCode 5.1 构建崩溃 - SpriteBuilder

回答by Chris Flesner

In your project's build settings, change Architectures from "Standard architectures" to "armv7, armv7s" (without the quotes).

在项目的构建设置中,将 Architectures 从“Standard architectures”更改为“armv7, armv7s”(不带引号)。

Or as matt pointed out, you can use $(ARCHS_STANDARD_32_BIT) instead, which is arguably the better way to go. Thanks matt!

或者正如马特指出的那样,您可以改用 $(ARCHS_STANDARD_32_BIT) ,这可以说是更好的方法。谢谢马特!