opencv 错误:stitching.hpp:136:10: 错误:expected identifier before ‘int’enum Status

it2023-04-08  70

在使用opencv和x11时,需要使用头文件:

opencv.hpp 和 X11/Xlib.h

当X11的头文件在opencv的头文件之前时,会产生错误:

stitching.hpp:136:10: 错误:expected identifier before ‘intenum Status stitching.hpp:137:5: 错误:expected unqualified-id before ‘{’ token {

解决方法:将opencv头文件放在X11之前

#include <opencv2/opencv.hpp> #include <X11/Xlib.h>

参考:https://github.com/opencv/opencv/issues/7113#issuecomment-239964226

最新回复(0)