演示需要OpenCV用于网络摄像头图像 - 未知类型名称“命名空间”

时间:2018-02-21 11:19:29

标签: opencv gcc deep-learning darknet

我正在使用darknet yolo进行机器学习。我已经改变了makefile YOLO OPENCV并尝试制作:

gcc -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv`  -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -c ./src/gemm.c -o obj/gemm.o
In file included from /usr/local/include/opencv2/core/types_c.h:59:0,
                 from /usr/local/include/opencv2/core/core_c.h:48,
                 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/core/cvdef.h:485:1: error: unknown type name ‘namespace’
 namespace cv {
 ^~~~~~~~~
compilation terminated due to -Wfatal-errors.
Makefile:85: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1

显示上述错误。如何解决这个问题?

0 个答案:

没有答案