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

catkin_make error (about opencv) #34

Closed
wang19950602 opened this issue Sep 20, 2017 · 7 comments · Fixed by #308
Closed

catkin_make error (about opencv) #34

wang19950602 opened this issue Sep 20, 2017 · 7 comments · Fixed by #308

Comments

@wang19950602
Copy link

Hello, I got a little problem with catkin_make.
I use ubuntu 14.04 , ROS:indigo , gcc version 4.8.4
When running 'catkin_make -DCMAKE_BUILD_TYPE=Release',I encounter a problem:
catkin_make error
The result shows that undefined reference to several opencv functions.
May I ask you how to fix this problem?
Thank you

@floft
Copy link

floft commented Sep 26, 2017

In src/darknet_ros/darknet_ros/CMakeLists.txt:
find the target_link_libraries and add ${OpenCV_LIBS} to the list (src)

Edit: Nope. Don't do that. That ends up seg faulting?

@floft
Copy link

floft commented Sep 27, 2017

Okay, so I'm on indigo and this appears to work:

cd src/
git clone https://github.com/superjax/cv3_bridge

In src/darknet_ros/darknet_ros/CMakeLists.txt:

  • find the cv_bridge and replace with cv3_bridge
  • find the find_package(OpenCV REQUIRED) and change to find_package(OpenCV 3 REQUIRED)
  • find the target_link_libraries(${PROJECT_NAME} ... and add ${OpenCV_LIBRARIES} to the end of the list

@Achllle
Copy link

Achllle commented Nov 19, 2017

The fix by @floft worked on Kinetic, you have to additionally go into package.xml in darknet_ros and change cv_bridge to cv3_bridge.

@joyyang1215
Copy link

Add ${OpenCV_LIBS} and it works.
Thanks!

@araster1010
Copy link

I have same problem as you.
I tried cv3_bridge, but it doesn't work.

In the CMakelists.txt, there are 4 target_link_libraries.
Should I add ${OpenCV_LIBS} all of them?

Could you tell me more detail about this?

@mbjelonic
Copy link
Collaborator

mbjelonic commented Jan 21, 2018 via email

@mbjelonic
Copy link
Collaborator

Merged the branch devel/threads.

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

Successfully merging a pull request may close this issue.

6 participants