【Qt】ubuntu14.04.5 qt5.6中使用opencv3.4报错:Using GTK+ 2.x and GTK+ 3 in the same process is not supported

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010168781/article/details/81302989

问题描述

ubuntu14.04.5 qt5.6中使用opencv3.4报错:
Using GTK+ 2.x and GTK+ 3 in the same process is not supported

原因

Qt5.6使用的GTK+2.x,opencv3.4安装时使用的GTK+3。

解决方法

1、降低opencv版本,将opencv3.4更换为opencv2.4
这个方法亲自验证过,可行
2、重新安装opencv3.4,在编译时选择GTK版本为 GTK+2
可以使用cmake-gui图像界面选择
或者使用cmake命令行:-DWITH_GTK_2_X=ON
该方法待验证

猜你喜欢

转载自blog.csdn.net/u010168781/article/details/81302989