本文主要是介绍【Qt】ubuntu14.04.5 qt5.6中使用opencv3.4报错:Using GTK+ 2.x and GTK+ 3 in the same process is not supported,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题描述
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
该方法待验证
这篇关于【Qt】ubuntu14.04.5 qt5.6中使用opencv3.4报错:Using GTK+ 2.x and GTK+ 3 in the same process is not supported的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!