我正在尝试在Ubuntu 18.04上编译Opencv。我安装了许多依赖项程序包,但运行make
时出现错误:
grfmt_jpeg2000.cpp:59:10: fatal error: jasper/jasper.h: No such file or directory
#include <jasper/jasper.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
我已经jasper
安装并安装了libjasperreports-java
。但是,在我的系统中仍然找不到文件jasper.h
。我可以通过apt install
安装任何库来获取该文件吗?还是我想念其他图书馆?
编辑1
我也尝试下载opencv_contrib来安装openCV的额外模块,但首先jaspar
不存在,其次使用
cmake -D CMAKE_INSTALL_PREFIX=./ -D CMAKE_BUILD_TYPE=Debug -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../openCV
返回错误:
Make Error at cmake/OpenCVModule.cmake:352 (message):
Duplicated modules NAMES has been found
而CMakeError.log包含许多类型的错误:
Build output check failed:
Regex: 'command line option .* is valid for .* but not for C\+\+'
Output line: 'cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++'