0
$\begingroup$

Rosanswers logo

Hello guys,

I want to compile a package (https://github.com/mjshiggins/ros-examples) with the catkin_make command from the catkin_ws folder, but it seems that the OpenCV header file is depreceated or not installed. I'm sure, that I install all OpenCV dependencies.

    /home/pkatsoulakos/catkin_ws/src/ros-examples-master/src/lidar/src/lidar_node.cpp:20:10: fatal error: opencv/cv.h: No such file or directory
   20 | #include <opencv/cv.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [ros-examples-master/src/lidar/CMakeFiles/lidar_node.dir/build.make:63: ros-examples-master/src/lidar/CMakeFiles/lidar_node.dir/src/lidar_node.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1373: ros-examples-master/src/lidar/CMakeFiles/lidar_node.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Thank you for your help.


Originally posted by Petros ADLATUS on ROS Answers with karma: 28 on 2022-04-01

Post score: 0


Original comments

Comment by Mike Scheutzow on 2022-04-01:
Have you installed apt package libopencv-dev?

Comment by Petros ADLATUS on 2022-04-01:
yes it's already installed. I copy the src folder with the 3 folders: fusion lidar radar into my personal workspace and execute catkin_make from the catkin_ws folder

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

for everyone who is interested i found the fault. The header file is depreceated and must be changed:

opencv/cv.h -> opencv2/core.hpp
opencv/highgui -> opencv2/highgui.hpp
+ add the header: opencv2/highgui/highgui_c.h

hope this helps anybody, if he stucked with this message.


Originally posted by Petros ADLATUS with karma: 28 on 2022-04-01

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.