Qtmsvc2010+Opencv2.4.9配置

本人看了网上许多教程,终于成功配置了opencv库,现将配置过程的经验分享出来,也给自己做个记录。

本人在配置时因为目录问题出现了很多问题,所以我最后将opencv目录放在D盘根目录下,并把openCV/bulid/x86/vc10/bin加入到环境变量中,在pro文件中添加包含目录及静态库,pro文件如下


INCLUDEPATH+=d:/opencv/build/include/opencv \
                    d:/opencv/build/include/opencv2 \
                   d:/opencv/build/include

win32:CONFIG(debug, debug|release): {
LIBS += -LD:\opencv\build\x86\vc10\lib \
-lopencv_core249d \
-lopencv_imgproc249d \
-lopencv_highgui249d \
-lopencv_ml249d \
-lopencv_video249d \
-lopencv_features2d249d \
-lopencv_calib3d249d \
-lopencv_objdetect249d \
-lopencv_contrib249d \
-lopencv_legacy249d \
-lopencv_flann249d
} else:win32:CONFIG(release, debug|release): {
LIBS += -LD:\opencv\build\x86\vc10\lib \
-lopencv_core249 \
-lopencv_imgproc249 \
-lopencv_highgui249 \
-lopencv_ml249 \
-lopencv_video249 \
-lopencv_features2d249 \
-lopencv_calib3d249 \
-lopencv_objdetect249 \
-lopencv_contrib249 \
-lopencv_legacy249 \
-lopencv_flann249
}


你可能感兴趣的:(Qt)