0

我正在安装 FACT++ 库,但是当我执行 make 时出现此错误:

cc1plus: warning: /usr/lib/jvm/java-11-openjdk-amd64/include/jni.h: not a directory
    In file included from Axioms.cpp:21:0:
    uk_ac_manchester_cs_factplusplus_FaCTPlusPlus.h:2:10: fatal error: jni.h: No such file or directory
     #include <jni.h>
          ^~~~~~~

当我找到 jni.h 时,它就在这里:

/usr/include/x86_64-linux-gnu/libavcodec/jni.h
/usr/lib/jvm/java-11-openjdk-amd64/include/jni.h

在我的 Makefile 我放:

# global optimisation options
GCC_OPT_OPT = -finline-limit=1200 -ffast-math -W -Wall -Wextra -O3 -fomit-frame-pointer -fPIC

# GCC 3.3 optimisation options that are not included in -O3
GCC_33_OPT = -ftracer -fgcse-sm
# GCC 3.4 optimisation options that are not included in -O3
GCC_34_OPT = $(GCC_33_OPT) -fgcse-las -fpeel-loops
# GCC 4.0 optimisation options that are not included in -O3
GCC_40_OPT = $(GCC_34_OPT) -fmodulo-sched -ftree-loop-linear -ftree-loop-im -fweb\
 -ftree-loop-ivcanon -fivopts -ftree-vectorize -fvariable-expansion-in-unroller
# GCC 4.1 optimisation options that are not included in -O3
GCC_41_OPT = $(GCC_40_OPT) -funsafe-loop-optimizations
# GCC 4.2 optimisation options that are not included in -O3
GCC_42_OPT = $(GCC_41_OPT)
# GCC 4.3 optimisation options that are not included in -O3
GCC_43_OPT = $(GCC_42_OPT) -fmodulo-sched-allow-regmoves -fipa-cp -fvect-cost-model
# GCC 4.4 optimisation options that are not included in -O3
GCC_44_OPT = $(GCC_43_OPT)

# define architecture; it will affect file extentions, dynamic flags.
# now LINUX, WINDOWS(untested), MACOSX are supported
OS = LINUX

CC_OPT = -I/usr/lib/jvm/java-11-openjdk-amd64/include/jni.h -I/usr/lib/jvm

# ALL_DEF is an external defines
GENERAL_DEFINES = $(GCC_OPT_OPT) $(GCC_42_OPT) $(ALL_DEF) $(CC_OPT)

我错过了什么?

4

1 回答 1

0

-I 标志需要一个目录,而不是一个文件,所以你的添加应该是

CC_OPT = -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm
于 2021-12-12T17:35:48.607 回答