1
我想爲我的「.c」文件使用swig工具。swig jni問題
我運行下面的命令,
$swig -java example.i $gcc -c example.c example_wrap.c -I/c/jdk1.3.1/include -I/c/jdk1.3.1/include/win32
然後我得到了下面的錯誤。
example_wrap.c:135:17: error: jni.h: No such file or directory example_wrap.c:159: error: expected ‘)’ before ‘*’ token example_wrap.c:201: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Java_exampleJNI_My_1variable_1set’ example_wrap.c:211: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JNICALL’ example_wrap.c:223: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JNICALL’ example_wrap.c:237: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JNICALL’ example_wrap.c:253: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JNICALL’
將在哪裏將會找到jni.h
。以及如何指定包含該路徑的路徑。