0

我正在尝试在 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++'
4

0 回答 0