I'm trying to recreate this tutorial on Windows: Java Native Interface (JNI)
When I try to compile it I get the following error:
fatal error: jni.h: No such file or directory
#include <jni.h>
compilation terminated.
My command line is:
gcc -Wl,--add-stdcall-alias -IC:\Program_Files\Java\jdk1.7.0_45\include -IC:\Program_Files\Java\jdk1.7.0_45\include\win32 -shared -o hello.dll HelloJNI.c
I compile in the folder where all the files are.
I am sure that the file "jni.h" in this folder is located:
C:\Program Files\Java\jdk1.7.0_45\include
Does anyone know why the import statement does not work?
Thanks!