Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Using Opencv with QT

    General and Desktop
    3
    4
    5277
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      omi1990 last edited by

      I have integrated opencv in qt .
      added all in .pro file also.
      qt can find library of cv but i m getting linker error on building it.
      @
      (?release@Mat@cv@@QAEXXZ)
      detection.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::VideoCapture::~VideoCapture(void)" (??1VideoCapture@cv@@UAE@XZ) referenced in function __unwindfunclet$?on_start_clicked@Detection@@AAEXXZ$0
      detection.obj : error LNK2019: unresolved external symbol "int __cdecl cv::waitKey(int)" (?waitKey@cv@@YAHH@Z) referenced in function "private: void __thiscall Detection::on_start_clicked(void)" (?on_start_clicked@Detection@@AAEXXZ)
      detection.obj : error LNK2019: unresolved external symbol "public: virtual bool __thiscall cv::VideoCapture::isOpened(void)const " (?isOpened@VideoCapture@cv@@UBE_NXZ) referenced in function "private: void __thiscall Detection::on_start_clicked(void)" (?on_start_clicked@Detection@@AAEXXZ)
      detection.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::VideoCapture::VideoCapture(int)" (??0VideoCapture@cv@@QAE@H@Z) referenced in function "private: void __thiscall Detection::on_start_clicked(void)" (?on_start_clicked@Detection@@AAEXXZ)
      release\Detection.exe : fatal error LNK1120: 5 unresolved externals
      command failed with exit code 1120
      command failed with exit code 2
      The process "C:\Qt\qtcreator-2.3.1\bin\jom.exe" exited with code 2.
      Error while building project Detection (target: Desktop)
      When executing build step 'Make'
      @
      i am using opencv 2.0 and qt creator 2.3.1

      pls help me with this.

      1 Reply Last reply Reply Quote 0
      • Q
        qxoz last edited by

        Can you post your .pro file?

        1 Reply Last reply Reply Quote 0
        • O
          omi1990 last edited by

          #-------------------------------------------------

          Project created by QtCreator 2011-11-25T00:34:05

          #-------------------------------------------------

          QT += core gui

          TARGET = Detection
          TEMPLATE = app

          SOURCES += main.cpp
          detection.cpp

          HEADERS += detection.h

          FORMS += detection.ui
          INCLUDEPATH += C:\OpenCV2.0\include
          LIBS += -LC:\OpenCV2.0\lib
          -lopencv_core220
          -lopencv_highgui220
          -lopencv_imgproc220
          -lopencv_features2d220
          -lopencv_calib3d220

          1 Reply Last reply Reply Quote 0
          • A
            AnuruddhaH last edited by

            Use forward slashes in paths. \ is used as a separator for multiple entries.

            INCLUDEPATH += C:/OpenCV2.0/include

            LIBS += -LC:/OpenCV2.0/lib
            -lopencv_core220
            -lopencv_highgui220
            -lopencv_imgproc220
            -lopencv_features2d220
            -lopencv_calib3d220

            1 Reply Last reply Reply Quote 0
            • First post
              Last post