我无法通过Netbeans获取JNI样本。
gcc -shared -m32 -c -g -I ../../../../../ Program \ Files / Java / jdk1.8.0_131 / include -I ../../。 ./../../ Program \ Files / Java / jdk1.8.0_131 / include / win32 -MMD -MP -MF“build / Debug / Cygwin-Windows / JNIDemo.od”-o build / Debug / Cygwin-Windows /JNIDemo.o JNIDemo.c
在/ cygdrive / c / Program Files / Java / jdk1.8.0_131 / include / jni.h:45:0中包含的文件中, 来自JNIDemoJava.h:6, 来自JNIDemo.c:2:
/ cygdrive / c / Program Files / Java / jdk1.8.0_131 / include / win32 / jni_md.h:34:9:错误:未知类型名称'__int64' typedef __int64 jlong;
^
#ifndef _Included_jnidemojava_Main
#define _Included_jnidemojava_Main
#include <jni.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: jnidemojava_Main
* Method: nativePrint
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_jnidemojava_Main_nativePrint
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#ifndef __int64
#define __int64 signed_64_bit_type long long
#endif
#endif