/home/xu/catkin_ws/src/vision_visp/visp_auto_tracker/flashcode_mbt/libauto_tracker/tracking.cpp:3:10: fatal error: highgui.h: 没有那个文件或目录
3 | #include "highgui.h"
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [vision_visp/visp_auto_tracker/CMakeFiles/auto_tracker.dir/build.make:76:vision_visp/visp_auto_tracker/CMakeFiles/auto_tracker.dir/flashcode_mbt/libauto_tracker/tracking.cpp.o] 错误 1
make[2]: *** 正在等待未完成的任务....
In file included from /home/xu/catkin_ws/src/vision_visp/visp_auto_tracker/flashcode_mbt/libauto_tracker/tracking.h:39,
from /home/xu/catkin_ws/src/vision_visp/visp_auto_tracker/flashcode_mbt/libauto_tracker/threading.h:3,
from /home/xu/catkin_ws/src/vision_visp/visp_auto_tracker/flashcode_mbt/libauto_tracker/threading.cpp:1:
/home/xu/catkin_ws/src/vision_visp/visp_auto_tracker/flashcode_mbt/libauto_tracker/states.hpp:3:10: fatal error: cv.h: 没有那个文件或目录
3 | #include "cv.h"
| ^~~~~~
compilation terminated.
make[2]: *** [vision_visp/visp_auto_tracker/CMakeFiles/auto_tracker.dir/build.make:63:vision_visp/visp_auto_tracker/CMakeFiles/auto_tracker.dir/flashcode_mbt/libauto_tracker/threading.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:9978:vision_visp/visp_auto_tracker/CMakeFiles/auto_tracker.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
done.
Checking md5sum on /home/xu/catkin_ws/devel/share/visp_auto_tracker/bag/tutorial-qrcode.bag
[ 98%] Built target visp_auto_tracker_bag
make: *** [Makefile:141:all] 错误 2
Invoking "make -j12 -l12" failed
在编译 vision_visp/visp_auto_tracker
项目时,找不到 highgui.h
文件。highgui.h
是 OpenCV 库中的一个头文件,通常位于 opencv
安装目录下。对于 OpenCV 3.x 及以上版本,highgui.h
通常位于 opencv2/highgui.hpp
中。可以将头文件引用修改为:
#include <opencv2/highgui.hpp>
cv.h
通常位于 opencv2/opencv.hpp
中。可以将头文件引用修改为:
#include <opencv2/opencv.hpp>