0

When I try to catkin build my workspace, I get this error:

CMakeFiles/openpose_ros_node_firephinx.dir/src/openpose_ros_node_firephinx.cpp.o: undefined reference to symbol '_ZN2cv7waitKeyEi'
//usr/local/lib/libopencv_highgui.so.3.2: error adding symbols: DSO missing from command line.

I have tried to add the OpenCV library manually to the CMakeLists.txt file, but the problem is persisting.

This is how I am including OpenCV:

find_package(OpenCV REQUIRED PATHS /usr/local/share/OpenCV NO_DEFAULT_PATH)
include_directories(${OpenCV_INCLUDE_DIRS})
xiawi
  • 1,772
  • 4
  • 19
  • 21
Masha
  • 1
  • It seems to be a linkage error, thus it may depend on the lib you link to the executable. – xiawi Sep 10 '19 at 16:02

1 Answers1

0

I added opencv_highgui to the target_link_libraries() in the CMake file to solve the problem.

Kevin
  • 16,549
  • 8
  • 60
  • 74
Masha
  • 1