我正在使用 make 文件按照 YOLO 指令使用 OPENCV=1 进行编译
GPU=1
CUDNN=0
OPENCV=1
OPENMP=0
DEBUG=0
尝试在具有 CUDA8.0 和 CUDNN6 的 Ubuntu 16.04 PC 上使用 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'`
` 有解决此问题的建议吗?