#define GC_APP_NAME_LIT myapp #define GC_APP_DOMAIN_LIT mydomain #define GC_NATIVE_FUNCTION_DEF(name,args) GC_NATIVE_FUNCTION_DEF_FINAL(GC_APP_DOMAIN_LIT,GC_APP_NAME_LIT,name,args) #define GC_NATIVE_FUNCTION_DEF_FINAL(domain,game,name,args) Java_com_##domain_##game_Game_##name args void GC_NATIVE_FUNCTION_DEF(nativeFunc, (JNIEnv * env, jobject obj)) { ... } Using the above code, I am assuming that a function with the following signature will be created.
void Java_com_mydomain_myapp_Game_nativeFunc(JNIEnv * env, jobject obj)) { ... } But this does not appear to be working.
On the other hand, A simpler version of this setup works perfectly.
#define GC_NATIVE_FUNCTION_DEF(name,args) Java_com_mydomain_myapp_Game_##name args void GC_NATIVE_FUNCTION_DEF(nativeFunc, (JNIEnv * env, jobject obj)) { ... } . . . and creates the function signature as desired.
Need help with identifying what am I doing wrong here. . .