生成JNI的DLL时提示找不到jni.h的解决办法Cannot open include file: 'jni.h': No such file or directory

在Windows下面:
gcc -mno-cygwin -I/cygdrive/f/Java/jdk1.7.0/include --I/cygdrive/f/Java/jdk1.7.0/include/win32 -Wl,--add-stdcall-alias -shared -o hellojni.dll hellojni.c
 
说明:
  1. #-mno-cygwin 必须填  
  2. #-I表示引入头文件位置  
  3. #-Wl,--add-stdcall-alias 为了防止出现UnsatisfiedLinkError  
​参考:http://ikeepu.com/bar/10171275
 

相关文章:

  • 2022-01-02
  • 2021-05-30
  • 2021-08-09
  • 2021-12-11
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案