作者:手机用户2502854041 | 来源:互联网 | 2023-10-10 15:03
博客http:blog.csdn.netqiurisuixiangarticledetails8665278已经完整地介绍了整个环境配置。需要一步不差按原执行。需要说明的是,几个p
博客http://blog.csdn.net/qiurisuixiang/article/details/8665278已经完整地介绍了整个环境配置。需要一步不差按原执行。需要说明的是,几个path的设定,千万不能有错,否者接下来的程序编译将会出错。path增加:
D:\Qt\Qt5.4.2\5.4\mingw491_32\bin;#你的qt安装目录
D:\opencv\bin;#你的opencv安装目录
D:\CMake\bin;#你的cmake目录
D:\Qt\Qt5.4.2\Tools\mingw491_32\bin #你的qt目录,是否和D:\Qt\Qt5.4.2\5.4\mingw491_32\bin重复?没关系,不影响你的程序便编译。
opencv的库设置,不同的版本做不同的选择,这里是opencv2.49:
INCLUDEPATH +=D:\opencv\include\opencv\
D:\opencv\include\opencv2\
D:\opencv\include
LIBS +=\
d:\opencv\lib\libopencv_calib3d249d.dll.a\
d:\opencv\lib\libopencv_contrib249d.dll.a\
d:\opencv\lib\libopencv_core249d.dll.a\
d:\opencv\lib\libopencv_features2d249d.dll.a\
d:\opencv\lib\libopencv_flann249d.dll.a\
d:\opencv\lib\libopencv_gpu249d.dll.a\
d:\opencv\lib\libopencv_highgui249d.dll.a\
d:\opencv\lib\libopencv_imgproc249d.dll.a\
d:\opencv\lib\libopencv_legacy249d.dll.a\
d:\opencv\lib\libopencv_ml249d.dll.a\
d:\opencv\lib\libopencv_objdetect249d.dll.a\
d:\opencv\lib\libopencv_video249d.dll.a