OPENCV=1 的 YOLO 编译失败

YOLO compilation with OPENCV=1 fails

我正在按照 YOLO 指令使用 make 文件进行编译,OPENCV=1

GPU=1
CUDNN=0
OPENCV=1
OPENMP=0
DEBUG=0

在 Ubuntu 16.04 PC 上使用 CUDA8.0 和 CUDNN6

尝试使用 OPENCV=1 进行制作时出现以下错误
`MYPC:~/darknet$ make
 gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv`  -DGPU -I/usr/local/cuda/include/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -c ./src/gemm.c -o obj/gemm.o
In file included from /usr/local/include/opencv2/core/core_c.h:48:0,
                 from /usr/local/include/opencv2/highgui/highgui_c.h:45,
                 from include/darknet.h:25,
                 from ./src/utils.h:5,
                 from ./src/gemm.c:2:
/usr/local/include/opencv2/highgui/highgui_c.h:139:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
 CVAPI(cv::Rect)cvGetWindowImageRect(const char* name);
 ^
compilation terminated due to -Wfatal-errors.
Makefile:85: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1`

附加信息:我的 opencv 安装位于文件夹名称为 "opencv"

的主目录中
`$ python
 Python 3.5.4 |Anaconda 4.2.0 (64-bit)| (default, Nov 20 2017, 18:44:38) 
 [GCC 7.2.0] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> 
 >>> import cv2
 >>> cv2.__version__
 '3.4.0'`

` 有什么解决这个问题的建议吗?

打开“/usr/local/include/opencv2/highgui/highgui_c.h”文件并注释掉第 139 行:

//CVAPI(cv::Rect)cvGetWindowImageRect(const char* name);