Qt 5.13+MSVC2015 配置opencv4.10

Qt 5.13+MSVC2015 配置opencv4.10

  • .pro配置文件中的设置

.pro配置文件中的设置

前提:需已编译好opencv
需将其中的路径替换为自己的opencv库的路径

INCLUDEPATH += $$quote( D:/Program Files/opencv-4.1.0-x64/install/include/opencv2\ )
INCLUDEPATH += $$quote( D:/Program Files/opencv-4.1.0-x64/install/include\ )
 DEPENDPATH += $$quote( D:/Program Files/opencv-4.1.0-x64/install/x64/vc14 )
win32:CONFIG(release, debug|release):\
LIBS += -L'D:/Program Files/opencv-4.1.0-x64/install/x64/vc14/lib/' \
    -lopencv_calib3d410 \
       -lopencv_core410 \
        -lopencv_dnn410 \
 -lopencv_features2d410 \
      -lopencv_flann410 \
       -lopencv_gapi410 \
    -lopencv_highgui410 \
  -lopencv_imgcodecs410 \
    -lopencv_imgproc410 \
         -lopencv_ml410 \
  -lopencv_objdetect410 \
      -lopencv_photo410 \
  -lopencv_stitching410 \
      -lopencv_video410 \
    -lopencv_videoio410
else:win32:CONFIG(debug, debug|release):\
LIBS += -L'D:/Program Files/opencv-4.1.0-x64/install/x64/vc14/lib/' \
   -lopencv_calib3d410d \
      -lopencv_core410d \
       -lopencv_dnn410d \
-lopencv_features2d410d \
     -lopencv_flann410d \
      -lopencv_gapi410d \
   -lopencv_highgui410d \
 -lopencv_imgcodecs410d \
   -lopencv_imgproc410d \
        -lopencv_ml410d \
 -lopencv_objdetect410d \
     -lopencv_photo410d \
 -lopencv_stitching410d \
     -lopencv_video410d \
   -lopencv_videoio410d

你可能感兴趣的:(Qt5问题解决,opencv,qt)