2 coco2d x2014 coco2d_x2014 于 2014.05.28 20:52 提问

cocos2d-x移植Android平台 Jni/hellocpp/main.cpp报错

#include "AppDelegate.h"
#include "cocos2d.h"
#include "CCEventType.h"
#include "platform/android/jni/JniHelper.h"
#include
#include

#define LOG_TAG "main"
#define LOGD(...) android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,VA_ARGS__)

using namespace cocos2d;

extern "C"
{

jint JNI_OnLoad(JavaVM vm, void *reserved)
{
JniHelper:: *
setJavaVM(vm); ** //这里报错

return JNI_VERSION_1_4;

}

void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thiz, jint w, jint h)
{
if (!CCDirector:: ** sharedDirector()->getOpenGLView() ** )//这里报错
{
CCEGLView view = CCEGLView:: * sharedOpenGLView() ** ;//这里报错
view->setFrameSize(w, h);

     *//这里报错* *AppDelegate* **  *pAppDelegate = new AppDelegate();
    CCApplication:: ** *sharedApplication()->run()* ** ;//这里报错
}
/*
else
{
    ccDrawInit();
    ccGLInvalidateStateCache();

    CCShaderCache::sharedShaderCache()->reloadDefaultShaders();
    CCTextureCache::reloadAllTextures();
    CCNotificationCenter::sharedNotificationCenter()->postNotification(EVNET_COME_TO_FOREGROUND, NULL);
    CCDirector::sharedDirector()->setGLDefaultValues(); 
}
 */

}

}

错误信息:E:/android-ndk-r8e-windows-x86_64/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/Scene/Menu.o: in function Menu::update(float):jni/../../Classes/Scene/Menu.cpp:119: error: undefined reference to 'AboutScene::scene()'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!