[英]cocos2d android compile time linking not working
I am trying to get cocos2d-android (cocos2d-2.0-rc2-x-2.0.1) "Helloworld" sample to run under windows. 我正在尝试获取cocos2d-android(cocos2d-2.0-rc2-x-2.0.1)“ Helloworld”示例以在Windows下运行。 I am using latest version of cygwin along side with android ndk r6, android sdk API 8. And I tried the manual here
我正在将最新版本的cygwin与android ndk r6,android sdk API 8一起使用。
after a lot of challenges I am down to this problem which I think is in linking the classes at compile time. 经过很多挑战之后,我想到了这个问题,我认为这是在编译时链接类的问题。 when I try to run the *build_native.sh* script I get an error stating that in CCGL.h ,
PFNGLDELETEVERTEXARRAYSOESPROC
which is defined as extern, does not name a type. 当我尝试运行* build_native.sh *脚本,我得到一个错误,指出在CCGL.h,
PFNGLDELETEVERTEXARRAYSOESPROC
其定义为extern,没有指定类型。
//declare here while define in CCEGLView_android.cpp
extern PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT;
extern PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT;
extern PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT;
'PFNGLDELETEVERTEXARRAYSOESPROC' is declared in CCEGLView.h. 在CCEGLView.h中声明了“ PFNGLDELETEVERTEXARRAYSOESPROC”。
#if CC_TEXTURE_ATLAS_USE_VAO
#include <EGL/egl.h>
PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOESEXT = 0;
PFNGLBINDVERTEXARRAYOESPROC glBindVertexArrayOESEXT = 0;
PFNGLDELETEVERTEXARRAYSOESPROC glDeleteVertexArraysOESEXT = 0;
#endif
I tried to add the header address to android.mk under jni directory, to LOCAL_C_INCLUDES, as suggested here ,but there were no rules to make them. 我尝试添加标题地址JNI目录下的Android.mk,以LOCAL_C_INCLUDES,如建议在这里 ,但没有规则,使他们。 so can anybody help me with how to compile/link this, it would be much appreciated.
所以任何人都可以帮助我如何编译/链接它,将不胜感激。
I had this problem, and using a higher version of NDK worked. 我遇到了这个问题,并且使用了更高版本的NDK。 Try to get the most recent version, reset the environment variables, and run build_native.sh again.
尝试获取最新版本,重置环境变量,然后再次运行build_native.sh。 http://developer.android.com/tools/sdk/ndk/index.html
http://developer.android.com/tools/sdk/ndk/index.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.