当我尝试建立我的工作空间时,出现此错误:
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.
我尝试将OpenCV库手动添加到CMakeLists.txt
文件中,但是问题仍然存在。
这就是我加入OpenCV的方式:
find_package(OpenCV REQUIRED PATHS /usr/local/share/OpenCV NO_DEFAULT_PATH)
include_directories(${OpenCV_INCLUDE_DIRS})
答案 0 :(得分:0)
我在CMake文件的opencv_highgui
中添加了target_link_libraries()
,以解决该问题。