无法让Qt Creator正确编译OpenCV

时间:2018-06-17 00:36:44

标签: c++ qt opencv

我正在尝试编译一个Qt项目,看起来OpenCV遇到了问题。从我到目前为止所读到的,这可能是编译器/链接问题。我尝试了几个不同的编译器,没有任何成功。其他库似乎没问题(libtiff,STD,其他Qt库),但OpenCV引起了问题。我没有为我的生活能够在修复它的任何进展,任何建议将不胜感激。以下发表的内容我认为可能对寻找解决方案很有价值。

Qt Makefile(.pro):

  <div class="clearfix">
      <div>
        <p><?=the_content();?></p>
      </div>
  </div>

的问题:

[Screenshot of Resulting Compile Issues]

构建并运行:

[Build and Run Kit Options]

[CMake (Not 100% sure if CMake is necessary for this project or right)]

我还认为cv ::被声明的方式很奇怪:

QT      += core gui multimedia widgets multimediawidgets opengl
TARGET   = LAUWebCalTag
TEMPLATE = app

DEFINES += QT_DEPRECATED_WARNINGS

SOURCES += \
        main.cpp \
        laumemoryobject.cpp \
        lauwebcamerawidget.cpp \
        lauvideosurface.cpp \
        lauvideoglwidget.cpp \
        laucaltagglwidget.cpp \
    laucaltagglobject.cpp

HEADERS += \
        laumemoryobject.h \
        lauwebcamerawidget.h \
        lauvideosurface.h \
        lauvideoglwidget.h \
        laucaltagglwidget.h \
    laucaltagglobject.h

RESOURCES += lauwebcameracapture.qrc

CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT

win32 {
    INCLUDEPATH   += $$quote(C:\Users\Sam\Downloads\opencv\build\include) $$quote(C:/usr/include)
    INCLUDEPATH   += $$quote(C:\Users\Sam\Downloads\tiff-4.0.9\tiff-4.0.9\libtiff)
    DEPENDPATH    += $$quote(C:\Users\Sam\Downloads\opencv\build\include) $$quote(C:/usr/include)
    LIBS          += -L$$quote(C:\usr\libs) -lopengl32
    LIBS          += -L$$quote(C:\Users\Sam\Downloads\opencv\build\x64\vc12\lib)
    LIBS          += -L$$quote(C:\Users\Sam\Downloads\tiff-4.0.9\tiff-4.0.9\libtiff) -llibtiff_i
    CONFIG(release, debug|release): LIBS += -lopencv_world310
    CONFIG(debug, debug|release):   LIBS += -lopencv_world310d
}

我为这个愚蠢的问题道歉,我对Qt和OpenCV都是全新的

0 个答案:

没有答案