qt 非常详细win7 qt opencv
番茄系统家园 · 2021-08-21 04:35:32

1、++环境参考前博文先搭建
2、下载版本,安装。运行
【项目】那编译器选择:。另外,重新编译要使用编译。把“\\bin”添加到环境变量PATH中。
在cmd中gcc-v看到4.4版本。
3.编译OpenCV,并测试例子(按照下面例子测试成功)
qtcreator2.4.0+qt4.7.4+mingw+opencv2.2(win7-32位)配置 http://www.xuebuyuan.com/2162023.html
本实验中2.3.1没有下载成功,所以采用了opencv2.2的版本。
或:OPencv库编译也可参考此文:https://dotuyau.wordpress.com/2014/04/25/opencv_qt_windows/
主要参考下面英文文章:
StepstobuildOpenCV2.3.1withQtandMinGW:
1.InstallQtSDKwiththeC++compileroption(MinGW).Youcandownloadithere.
2.Add“D:\QtSDK\mingw\bin”tothesystemPATH.
3.DownloadandinstallCMake(2.8.5).
4.DownloadandinstallOpenCV2.3.1(OpenCV-2.3.1-win-superpack.exe).
5.RunCMakeGUI.
6.Setthesourcecode:“D:\OpenCV2.3.1_src"
7.Setwheretobuildbinariesto:“D:\OpenCV2.3.1_out”.
8.PressConfigure
9.LetCMakecreatethenewfolder.
10.Specifythegenerator:MinGWMakefiles.
11.Select“SpecifyNativeCompilers”andclickNext.
12.ForCset:“D:\QtSDK\mingw\bin\gcc.exe”
13.ForC++set:“D:\QtSDK\mingw\bin\g++.exe”
14.ClickFinish
15.Intheconfigurationscreentypein“DEBUG”(or“RELEASE”ifyouwanttobuildareleaseversion)forCMAKE_BUILD_TYPE.CheckBUILD_EXAMPLESifyouwant.CheckWITH_QT.
16.Clickconfigureagain.
17.Theconfigurescreenwillmakeyouspecifythe"CUDA_TOOLKIT_ROOT_DIR"path.
setCUDA_TOOLKIT_ROOT_DIRto:"D:/QtSDK/Desktop/Qt/4.7.3/mingw/bin"
18.Clickconfigureagain.Clickgenerate.CloseCMake.
19.Goto"D:\OpenCV2.3.1_out"DIRandtype“mingw32-
make”andhitenter(thismighttakesometime).
免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/post/41905.html。

