Clion非常适合写C++程序
首先把C:Program FilesJavajdk1.7.0_79include和C:Program FilesJavajdk1.7.0_79includewin32的头文件都复制到C:cygwin64usrinclude目录下
注意:是jdk1.7.0_79include的头文件和jdk1.7.0_79includewin32的头文件要放着同级别目录
直接编译的话,会报错
cygwin jni 报错 '__int64' does not name a type error: 'jlong' does not name a type
此时,因为cygwin下gnu是不带__int64这个宏的。
所以需要在jni_md.h修改__int64
原先是这样的
typedef long jint;
typedef __int64 jlong;
typedef signed char jbyte;
改为
typedef long jint;
#ifdef __GNUC__
typedef long long jlong;
#else
typedef __int64 jlong;
#endif
typedef signed char jbyte;
转载请注明出处:http://www.cnblogs.com/stonehat/