jwenjian / ghiblog

GitHub Issues Blog, powered by GitHub Issues and GitHub Actions

Home Page:https://1link.fun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++: jni.h: no such file or directory

jwenjian opened this issue · comments

C++代码中:

#include <jni.h>

Visual studio运行报错:

Cannot open include file: 'jni.h': No such file or directory

解决步骤(Visual Studio 2019):

  1. Project -> Properties -> VC++ Directories
    image

  2. 修改Include Didrectories, 添加本地${JAVA_HOME}/include${JAVA_HOME}/include/win32目录:
    image

${JAVA_HOME} should change to $(JAVA_HOME)