Android NDK: No implementation found for native xxxxxx

前端 未结 2 1263
无人共我
无人共我 2021-01-26 10:14

I do a project in using Tess-two, i want to use the method pixConvertRGBToLuminance, but it always the error:

No implementation found for native Lc         


        
相关标签:
2条回答
  • 2021-01-26 10:43

    Another question where the answer is C++ name mangling - declare your function as èxtern "C"

    0 讨论(0)
  • 2021-01-26 10:50
    extern "C" jint Java_com_googlecode_letonica_android_Pix_nativePixConvertRGBToLuminance(JNIEnv *env,
        jclass clazz, jint nativePixs){
    
    PIX *pixs = (PIX *)nativePixs;
    
    LOGE("------------------>Failed to find native pixConvertRGBToLuminance File");
    PIX *pixd = pixConvertRGBToLuminance(pixs);
    return (jint) pixd;
    }
    

    Refer Calling a Java function from C++ on Android over JNI

    0 讨论(0)
提交回复
热议问题