开发者

JNI syntax in Android NDK

开发者 https://www.devze.com 2023-04-04 09:57 出处:网络
Quick question about the JNI syntax in Android NDK This is my function name in c++ code JNIEXPORT void JNICALL Java_ogs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)

Quick question about the JNI syntax in Android NDK

This is my function name in c++ code

JNIEXPORT void JNICALL Java_ogs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)

And my log cat error msg

09-10 01:08:38.4开发者_开发知识库76: WARN/dalvikvm(278): No implementation found for native Logs/test/ogskcg;.ogstranspose ()V

Can you let me know is it the name prefix problem or something else


JNIEXPORT void JNICALL Java_ogs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)

Should not be (you missed a L):

JNIEXPORT void JNICALL Java_Logs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)


You try this("void Java_ogs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)") decleration. and use extern keyword

extern "C"{
 void Java_ogs_test_ogskcg_ogstranspose(JNIEnv * env, jobject obj)
} 
0

精彩评论

暂无评论...
验证码 换一张
取 消