环境

操作系统:Ubuntu 16.04

OpenCv版本:3.4.6

交叉工具链:arm-linux-gnueabihf-gcc,gcc version 9.1.0 (GCC)

问题描述:

fatal error: zlib.h: No such file or directory

编译过程中可能报错“fatal error: zlib.h: No such file or directory #include “zlib.h”

解决:

在opencv3.4.6目录下,修改最顶层的CMakeList.txt,找到ocv_include_directories(${OPENCV_CONFIG_FILE_INCLUDE_DIR}),并在下面添加:

ocv_include_directories(./3rdparty/zlib)

Logo

更多推荐