Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from "make" when enabling OpenCV 3 #551

Closed
GuidoBartoli opened this issue Mar 22, 2018 · 8 comments
Closed

Error from "make" when enabling OpenCV 3 #551

GuidoBartoli opened this issue Mar 22, 2018 · 8 comments

Comments

@GuidoBartoli
Copy link

Hi,
I'm using Linux Mint 18.3 64-bit (Ubuntu 16.04) with OpenCV 3.4.1 correctly configured and installed.
I just cloned the darknet repository and enabled OpenCV support in the Makefile setting OPENCV=1.
When issuing the make command, I receive this error:

mkdir -p obj mkdir -p results gcc -Iinclude/ -Isrc/ -DOPENCVpkg-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

Which is strange, because namespace cv is used by almost every application based on OpenCV... What am I missing here? Is this OpenCV not compatible with Darknet?

Thanks,
Best regards

@GuidoBartoli GuidoBartoli changed the title Error from "make" when enabling OpenCV Error from "make" when enabling OpenCV 3 Mar 22, 2018
@MaeThird
Copy link

C API is not supported by the opencv official in their 3.4 version. As cited here:opencv/opencv#10941 and:opencv/opencv#10963

@AlexeyAB
Copy link
Collaborator

@GuidoBartoli There is C API bug in OpenCV 3.4.1.
Try to use OpenCV 3.4.0

@GuidoBartoli
Copy link
Author

Yep, that works, thanks!

@beyhangl
Copy link

I'm using 3.4.0 but have this problem.

import cv2
cv2.version
'3.4.0'

@hikariakio
Copy link

Guys...sorry for question...how can i compile darknet with opencv 3.4.0 .. whenever I use brew install opencv , it gives me latest version of opencv (3.4.1)..

How can i use darknet with opencv3.4.0 in mac?

@evilmtv
Copy link

evilmtv commented Jul 13, 2018

@Firststep2014
Copy link

@AlexeyAB
Hello,I've used Opencv3.4.1,and my problem happens to be "error: unknown type name 'namespace'"
image
Does this mean to be same question?

@PeterQuinn925
Copy link

This is the same issue. Use the recommended version of OpenCV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants