简体   繁体   English

如何在Qt5中使用OpenCV

[英]How to use OpenCV with Qt5

I'm migrating my code from Qt4 to Qt5 that uses OpenCV to take shots from the Webcam and display it on QLabel, on Qt4 everything works fine, but in Qt5 i have a trouble. 我正在将我的代码从Qt4迁移到Qt5,后者使用OpenCV从网络摄像头拍摄照片并将其显示在QLabel上,在Qt4上一切正常,但是在Qt5中我遇到了麻烦。 The libstdc++-6.dll that is required both from Qt and OpenCV are different (the used by OpenCV has 957 KB(i got it by download of MinGW on the SourceForge page), and the required by Qt5 that came with the Qt5 installer has 874 KB) and when i try to use one i got this error: "The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll" and when i try to use another dll i got this error: "The procedure entry point __gxx_personality_sj0 could not be located in the dynamic link library libstdc++-6.dll". Qt和OpenCV所需的libstdc ++-6.dll是不同的(OpenCV使用的是957 KB(我是从SourceForge页面上的MinGW下载获得的),而Qt5安装程序随附的Qt5则具有874 KB),当我尝试使用一个dll时,出现此错误:“过程入口点__gxx_personality_v0不能位于动态链接库libstdc ++-6.dll中”,当我尝试使用另一个dll时,出现了此错误:“在动态链接库libstdc ++-6.dll中找不到过程入口点__gxx_personality_sj0。 What i can do to solve this issue and use OpenCV with Qt5? 我该怎么做才能解决此问题,并在Qt5中使用OpenCV?

我找到了一个简单的解决方案:使用vc11预编译的库(不需要libstdc ++-6.dll,从而避免与Qt5所需的libstdc ++-6.dll冲突),而不是使用MinGW的OpenCV预编译库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM