Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt 5.0.2 MinGw opencv2.4.4 integration
Forum Updated to NodeBB v4.3 + New Features

Qt 5.0.2 MinGw opencv2.4.4 integration

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.6k Views 1 Watching
  • 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.
  • C Offline
    C Offline
    canavaroski90
    wrote on last edited by
    #1

    Hi all!

    I'm trying to integrate opencv to Qt environment.

    Here is what I've done so far;
    @- Installed Qt 5.0.2 - 32bit (with qt creator 2.7.0 and mingw compiler- not msvc)

    • Installed opencv2.4.4 under C:\OpenCv\
    • Added C:\OpenCv\build\x86\mingw\lib and C:\OpenCv\build\x86\mingw\bin directories to the ENVIRONMENT VARIABLES.@

    and here is my .pro file

    @
    INCLUDEPATH += C:\OpenCv\build\include
    INCLUDEPATH += "C:\OpenCv\modules\core\include"
    "C:\OpenCv\modules\highgui\include"
    BASE_PATH = c:/OpenCv/build/x86/mingw
    CONFIG(release,debug|release)
    {
    win32: LIBS += -L$$BASE_PATH/lib/ -lopencv_calib3d244
    -lopencv_contrib244
    -lopencv_core244
    -lopencv_features2d244
    -lopencv_flann244
    -lopencv_gpu244
    -lopencv_highgui244
    -lopencv_imgproc244
    -lopencv_legacy244
    -lopencv_ml244
    -lopencv_objdetect244
    -lopencv_video244
    }
    CONFIG(debug,debug|release)
    {
    win32: LIBS += -L$$BASE_PATH/lib/ -lopencv_calib3d244d
    -lopencv_contrib244d
    -lopencv_core244d
    -lopencv_features2d244d
    -lopencv_flann244d
    -lopencv_gpu244d
    -lopencv_highgui244d
    -lopencv_imgproc244d
    -lopencv_legacy244d
    -lopencv_ml244d
    -lopencv_objdetect244d
    -lopencv_video244d
    }
    @

    When I try to build the project it gaves me following error:
    @:-1: error: cannot find -lopencv_calib3d244d@

    I've noticed that the files under the \lib\ folder are named like this;
    @libopencv_calib3d244.dll.a
    libopencv_contrib244.dll.a
    ...@

    However I couldn't add .a files to the project.

    Is there a missing step or anything else that I am not doing correctly?

    What sould I do now?

    Best regards.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kibsoft
      wrote on last edited by
      #2

      With MinGW compiler you should include libs like this:

      • llibopencv_highgui244 - lib at the start.

      Are you sure you need all the libs you included? :)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved