【问题标题】:not building with ./build_native.sh and android- ndk-r8 in cocos2d-x不在 cocos2d-x 中使用 ./build_native.sh 和 android-ndk-r8 构建
【发布时间】:2013-04-11 21:28:53
【问题描述】:

我已经在cocos2d-x中下载了一个项目的源代码。

我正在使用 Hello World 示例中的 ./build_native.sh,它确实有效。

在编译时我再次收到此错误:

Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Gdbsetup       : libs/armeabi/gdb.setup
Compile++ thumb  : cocos2d <= CCGrabber.cpp
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In constructor 'cocos2d::CCGrabber::CCGrabber()':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:46:32: error: 'glGenFramebuffersOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::grab(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:61:47: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:65:26: error: 'glFramebufferTexture2DOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:68:63: error: 'glCheckFramebufferStatusOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::beforeRender(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:88:47: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In member function 'void cocos2d::CCGrabber::afterRender(cocos2d::CCTexture2D*)':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:113:50: error: 'glBindFramebufferOES' was not declared in this scope
jni/../../libs/cocos2dx/effects/CCGrabber.cpp: In destructor 'virtual cocos2d::CCGrabber::~CCGrabber()':
jni/../../libs/cocos2dx/effects/CCGrabber.cpp:127:35: error: 'glDeleteFramebuffersOES' was not declared in this scope

我搜索并找到了this sollution。但这对我不起作用。我仍然遇到同样的错误。也许在 ndk-r8 中有所不同,而解决方案是针对 ndk-r7。

有什么帮助吗?

【问题讨论】:

    标签: android-ndk cocos2d-x


    【解决方案1】:

    你的android sdk版本必须大于2.2。因为从2.2开始,android开始支持opengl es 2.0,cocos2d-x 2.0使用opengles 2.0渲染

    【讨论】:

    • 更大或相等或仅更大?因为我使用的是 2.2(api 8)。不过,我会再检查一次。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-03
    相关资源
    最近更新 更多