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 "OpenCV 4.x+ requires enabled C++11 support" #200

Closed
Ajaygirish1 opened this issue Nov 25, 2019 · 17 comments · Fixed by #257 or #308 · May be fixed by #202
Closed

error "OpenCV 4.x+ requires enabled C++11 support" #200

Ajaygirish1 opened this issue Nov 25, 2019 · 17 comments · Fixed by #257 or #308 · May be fixed by #202
Labels
build build (bugs)

Comments

@Ajaygirish1
Copy link

Ajaygirish1 commented Nov 25, 2019

Hey all,
I am facing the below error,
error "OpenCV 4.x+ requires enabled C++11 support" while executing catkin make,
I have tried inserting
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
in Cmake.txt of darknet_ros node but still doesnt work.
Screenshot from 2019-11-25 05-42-03
CMakeLists.txt

@cardboardcode
Copy link

You can try have a look at pull request #202 by @kunaltyagi.

Compiled the version under this fork and it solved the compilation issue.

Hope this helps.

@mywnajsldkf
Copy link

which openCV version do you use??

@kunaltyagi
Copy link
Contributor

I use OpenCV@HEAD

@mywnajsldkf
Copy link

@kunaltyagi oh! thank you for answering. I installed opencv3.4.6, after catkin_make darknet_ros, I met error "OpenCV 4.x+ requires enabled C++11 support" can I you your solution(256ea50 by following this commit) to solve my problem??

@mywnajsldkf
Copy link

mywnajsldkf commented Feb 25, 2020

I want to use darknet_ros to detect something!!

@kunaltyagi
Copy link
Contributor

I installed opencv3.4.6, after catkin_make darknet_ros, I met error "OpenCV 4.x+ requires enabled C++11 support" can I you your solution(256ea50 by following this commit) to solve my problem??

You have OpenCV 4 not 3 installed, and yes, my fork works with latest OpenCV and ROS. If you want to work on darknet directly, I'd recommend https://github.com/alexeyab/darknet instead.

@mywnajsldkf
Copy link

I installed opencv3.4.6, after catkin_make darknet_ros, I met error "OpenCV 4.x+ requires enabled C++11 support" can I you your solution(256ea50 by following this commit) to solve my problem??

You have OpenCV 4 not 3 installed, and yes, my fork works with latest OpenCV and ROS. If you want to work on darknet directly, I'd recommend https://github.com/alexeyab/darknet instead.

Oh, I'm sorry for bothering you
But when I enter pkg_config --modeversion opencv opencv3.4.6 show up. also I tested it on python. And I want to detect on ROS.

@prit-ubuntu
Copy link

@Ajaygirish1 and @mywnajsldkf did you end up finding a solution? I am facing the same problems. I'm using Ubuntu 18.04 and OpenCV 3.4.0 for this purpose.

@mywnajsldkf
Copy link

@prit-ubuntu Do you want to use OpenCV 3.4.0 for using darknet_ros? If you want it, I recommend following this procedure

  1. Delete OpenCV already installed your hardware!
    sudo find / -name "*opencv*" -exec rm -i {} \;
  2. Install OpenCV (https://jkjung-avt.github.io/opencv-on-nano/)
    i recommend this blog. And If you use ROS version1, ROS default python package is python2.7. So I changed shell script a little to install OpenCV 3.4.6 on python2

@prit-ubuntu
Copy link

@mywnajsldkf so basically the solution you mentioned above worked for you to run darknet_ros? Yes, i do want to use OpenCV 3.4.0 for darknet_ros.

@mywnajsldkf
Copy link

mywnajsldkf commented Jul 18, 2020

@prit-ubuntu It is best for me!
darknet_ros is working on OpenCV 3.4.6 too!

@kunaltyagi
Copy link
Contributor

You can also use my fork (I really should move it to point to AlexyAB's implementation)

@prit-ubuntu
Copy link

@mywnajsldkf and @kunaltyagi I'm happy to inform you that I have finally managed to compile darknet_ros on my system! Thanks for your help.

@Silerqin
Copy link

Silerqin commented Sep 9, 2020

hi, I am getting the same issue. Can I know how to solve it? @kunaltyagi I have see your fork, can I know how to install it?

@kunaltyagi
Copy link
Contributor

There are other more up-to-date PRs. My fork has been unmaintained for a while so I personally wouldn't recommend it. See #257 and @230

However, my fork still works if you still want to use it. Please use the opencv4 branch, and clone it (with submodules) in your workspace (or underlay of that workspace) 😄

@Silerqin
Copy link

Silerqin commented Sep 9, 2020

@kunaltyagi I already use openCV4 but it still have error

@tomlankhorst
Copy link
Contributor

Support for OpenCV4 seems to be lagging a little. Maybe @mbjelonic has an indication of if and when it might come.
@ranjitkathiriya

@tomlankhorst tomlankhorst reopened this Dec 1, 2020
@tomlankhorst tomlankhorst added the build build (bugs) label Dec 1, 2020
This was linked to pull requests Dec 1, 2020
@mbjelonic mbjelonic linked a pull request Apr 8, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build (bugs)
Projects
None yet
7 participants