我想用Qt(5.11)编译OpenCV(3.4)(设置CMake-option WITH_QT并设置Qt5 * _DIR路径)。源代码是从github或Qt网站上全新下载的。 VC14的解决方案文件夹是使用最新的CMake创建的。
如果我使用VC14(Visual Studio 2015 C ++)进行编译,它将完美地编译并链接单个模块。
但是,如果我还选择CMake选项BUILD_opencv_world,则会出现无尽(226)的链接错误:“未解析的外部符号...”。它们都与项目opencv_world有关。
如果删除CMake选项“ WITH_QT”,我也可以创建opencv_world文件。
我怎么做错了?
下面是错误列表的第一项:
严重性代码说明项目文件行抑制状态
错误LNK1120 226未解决 外部opencv_world D:\ LIBS \ opencv-make-VC14 \ bin \ Debug \ opencv_world341d.dll 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: MatchScene :: staticMetaObject“ (?staticMetaObject @ MatchScene @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ matchscene.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ matchsettingsselector.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ dual_filter_view.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ singlefilterview.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ view_controller.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ keypointselectionselector.obj 1
错误LNK2001无法解析的外部符号“ public:静态结构 QMetaObject const cvv :: qtutil :: SignalQString :: staticMetaObject“ (?staticMetaObject @ SignalQString @ qtutil @ cvv @@ 2UQMetaObject @@ B)opencv_world D:\ LIBS \ opencv-make-VC14 \ modules \ world \ keypointsettingsselector.obj 1