在此运行Visual Studio 2012 项目时出现

#include <stdio.h>

#include <jni.h>

int main()

{

printf("Hello World");

}

But when I try to build, I get the following error -

1>c:testtest.cpp(2) : fatal error C1083: Cannot open include file: 'jni.h': No such file or directory

解决办法。

就是到jdk的安装目录下include下把以下相应的文件,复制到vc目录下的include文件夹下

\jdk\include\jni.h

\jdk\include\win32\jawt_md.h

\jdk\include\win32\jni_md.h

主是jdk安装目录下的三个文件,分别复制它们到vc目录下的include文件夹下。如我的安装位置是:C:\Program Files\Microsoft Visual Studio 11.0\VC\include

你们可以根据自己的安装位置自行确定。

转载于:https://www.cnblogs.com/playerboy/p/3925261.html

Cannot open include file: jni.h: No such file or directory解决方法相关推荐

  1. mysql-python 安装错误: Cannot open include file: 'config-win.h': No such file or directory

    问题描述: pip instal MySQL-Python 出现如下错误: [plain] view plain copy Installing collected packages: MySql-p ...

  2. _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':no such file or directory

    Window7下使用"pip"安装"MySQL-python"提示错误:_mysql.c(42) : fatal error C1083: Cannot ope ...

  3. Keil编译报错:Cannot open include file: 'stdbool.h': No such file or directory问题解决

    Keil编译出现报错:Cannot open include file: 'stdbool.h': No such file or directory,或者出现Error: L6411E: No co ...

  4. can not open include file afxwin.h :no such header fileor directory in vs 2015 c++

    一.问题 今天做mfc项目的时候,自己使用的编译器是vs2015,但是,很不辛,一开始就掉坑里,头文件都不能包含,编译一下你会发现下面的错误: can not open include file &q ...

  5. fatal error C1083: Cannot open include file: 'iostream.h': No such file or dire

    错误: fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory 我的源代码测试回调函数 ...

  6. MySQLdb/_mysql.c(29) : fatal error C1083: Cannot open include file: ‘mysql.h‘: No such file or direc

    环境:64位Windows10系统,python2.7.15 问题:安装pip install mysqlclient时报错MySQLdb/_mysql.c(29) : fatal error C10 ...

  7. windows 安装达梦数据库Python 报错:fatal error C1083: Cannot open include file: ‘DPI.h‘: No such file or direc

    报错: c:\dmdms program\drivers\python\dmpython\strct.h(18): fatal error C1083: Cannot open include fil ...

  8. error: #5: cannot open source input file core_cm3.h: No such file or directory

    用Keil  vision5编译时出现以下错误: D:\MDK\install\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Device\Include\stm32f10x.h ...

  9. 02_Keil5报错 error: #5: cannot open source input file “XXX.h”: No such file or directory解决方法

    Keil5  error: #5: cannot open source input file "led.h": No such file or directory 是找不到包含文 ...

最新文章

  1. WP8调用NativeCode
  2. R读取excel文件乱码 read.xlsx() 解决方法
  3. 编译rocksdb源码导致的部署失败
  4. 从文件夹里面多个文件里面查找指定内容
  5. 最佳展示场景kit:顶部视角的展示场景(Mockups)
  6. python框架django教程_[Python] Django框架入门3——深入视图
  7. 【Git/Github学习笔记】Git常用命令(代码冲突)
  8. Julia : 1亿条记录读取测试,及几个优化点
  9. Mac电脑专业音乐制作Logic Pro X中文
  10. 软件测试中单元测试的内容有哪些?-alltesting云测试
  11. 小写和大写开头的英文名字  internet 和Internet在意思上有何重要区别?
  12. 【面经】数据开发一面-美团暑期实习
  13. 使用 FFmpeg 删除导出视频字幕文件
  14. 关于航空障碍灯的介绍
  15. 苹果自研M1芯片跑分曝光-新MacBook Air超2019款顶配MacBook Pro
  16. 在ORACLE中用DBCA创建数据库
  17. Windows Oracle ODBC驱动数据源安装配置
  18. 【超图+CESIUM】【基础学习使用】01、前置学习资料
  19. vue cli3关闭烦人的eslint 亲测有效
  20. 矩阵的特征值与特征向量及性质及相似矩阵

热门文章

  1. vue的双向绑定原理及实现
  2. koa --- [MVC实现之五]Model层的实现
  3. 27 JSX函数子元素的应用与思考
  4. Sql Server临时表中插入标示列
  5. leetcode -39组合总数
  6. 关于iOS里的做动画方法的差别与注意事项
  7. Android绘制(三):Path结合属性动画, 让图标动起来!
  8. React 是怎样炼成的
  9. apache域名跳转
  10. 前端每周清单第 30 期:WebVR 指南,Vue 代码分割范式,理想的 React 架构特性