小编nvg*_*g58的帖子

将Xcode更新为5.1时,错误"从指向较小类型'int'的指针转换为EAGLView.mm中的信息"(5B130a)

昨天,我将Xcode更新到最新版本(5.1 (5B130a))以兼容iOS 7.1.然后我构建我的项目,当选择64位模拟器(例如:iPhone Retina 4英寸64位)时,我"Cast from pointer to smaller type 'int' loses information"EAGLView.mmfile(line 408)中得到错误.

我正在使用cocos2d-x-2.2.2.在我更新Xcode之前,我的项目仍然可以在所有设备上构建和运行.

感谢所有推荐.

更新:今天,我下载了最新版本的cocos2d-x(cocos2d-x 2.2.3).但问题仍然存在.

以下是发生错误的一段代码:

/cocos2d-x-2.2.2/cocos2dx/platform/ios/EAGLView.mm:408:18: Cast from pointer to smaller type 'int' loses information

// Pass the touches to the superview
#pragma mark EAGLView - Touch Delegate
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    if (isKeyboardShown_)
    {
        [self handleTouchesAfterKeyboardShow];
        return;
    }

    int ids[IOS_MAX_TOUCHES_COUNT] = {0};
    float xs[IOS_MAX_TOUCHES_COUNT] = {0.0f};
    float ys[IOS_MAX_TOUCHES_COUNT] = {0.0f};

    int …
Run Code Online (Sandbox Code Playgroud)

iphone cocos2d-x xcode5 ios7.1 cocos2d-x-2.x

21
推荐指数
4
解决办法
3万
查看次数

标签 统计

cocos2d-x ×1

cocos2d-x-2.x ×1

ios7.1 ×1

iphone ×1

xcode5 ×1