由于找不到jasper.h,因此无法在Ubuntu 18.04上编译Open CV

时间:2018-10-01 11:00:33

标签: opencv compiler-errors compilation ubuntu-18.04 jasper-plugin

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

0 个答案:

没有答案