怎么在Qt Creator中添加OpenCV库
展开全部
在你的pro文件里
OPENCV_PATH = C:/opencv/build # 你的opencv folder
INCLUDEPATH += $${OPENCV_PATH}/include \
$${OPENCV_PATH}/include/opencv \
$${OPENCV_PATH}/include/opencv2
CONFIG(release, debug|release) {
LIBS += $${OPENCV_PATH}/x64/vc11/lib/opencv_highgui249.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_imgproc249.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_core249.lib
# .... 你想用的库 release 版本 /x64, /vc11 对应你的编译器版本
}
CONFIG(debug, debug|release) {
LIBS += $${OPENCV_PATH}/x64/vc11/lib/opencv_highgui249d.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_imgproc249d.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_core249d.lib
# .... 你想用的库 debug 版本, /x64, /vc11 同上
}
OPENCV_PATH = C:/opencv/build # 你的opencv folder
INCLUDEPATH += $${OPENCV_PATH}/include \
$${OPENCV_PATH}/include/opencv \
$${OPENCV_PATH}/include/opencv2
CONFIG(release, debug|release) {
LIBS += $${OPENCV_PATH}/x64/vc11/lib/opencv_highgui249.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_imgproc249.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_core249.lib
# .... 你想用的库 release 版本 /x64, /vc11 对应你的编译器版本
}
CONFIG(debug, debug|release) {
LIBS += $${OPENCV_PATH}/x64/vc11/lib/opencv_highgui249d.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_imgproc249d.lib \
$${OPENCV_PATH}/x64/vc11/lib/opencv_core249d.lib
# .... 你想用的库 debug 版本, /x64, /vc11 同上
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询