cocos2d-x 위키 샘플보면












// SampleNative.h

#ifdef __cplusplus

extern "C" {

#endif 


jint Java_org_cocos2dx_sample_Sample_nativeAdd(JNIEnv *env, jobject thiz, jint a, jint b)

{

    return a + b;

}


#ifdef __cplusplus

}

#endif





jni c++호출은 이렇게 사용하는데요; 만약에 이부분을


jint Java_org_cocos2dx_sample_Sample_nativeAdd(JNIEnv *env, jobject thiz, jint a, jint b)

{

        CCDirector* pDirector = CCDirector::sharedDirector();

        CCScene* pScene = pDirector->getRunningScene();

        int tag = pScene->getTag();

        return (jint)tag;

}


#ifdef __cplusplus

}

#endif


이런식으로 cocos2d-x 게임 코드와 연동하고싶은데 안되네요ㅠㅠ


cocos2d-x <-> Android api 사이의 호출이 잦은 앱을 만드려고 하는데... 안되네요..

어떻게 하면 라이브러리 간에 연동이 될까요??