整理MINGW编译dll使用JNI被java调用的几种方式
第一种方式,在msys中直接编译各个源文件,不管是c或者c++文件,都能生产被JNI调用的dll库 JNI-MINGW-DLL Posted August 10th, 2008 by fhackenberger JNI is the Java Native Interface, you will need to download and install the Java SDK. Note the installation directory (ie/ c:/j2sdk1.4.1_02 ) for use later. If you are using MSYS add a line similiar to the following in /etc/fstab and then restart MSYS: c:/j2sdk1.4.1_02 /java In MSYS the JNI DLL can be generated using the following (NOTE: -Wl has an 'L' not a '1'): gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at -I/java/include -I/java/include/win32 -shared -o JavaImp.dll someJavaImp.c In a