80,348
社区成员
发帖
与我相关
我的任务
分享
package com.example.jnitest;
public class TestJni {
public TestJni() {
}
public native int sum(int i,int j);
}
#include <stdio.h>
#include <stdlib.h>
#include "com_example_jnitest_TestJni.h"
JNIEXPORT jint JNICALL Java_com_example_jnitest_TestJni_sum(JNIEnv* env,jobject obj,jint i, jint j)
{
return i + j ;
}