Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Creator opencv include problem
Forum Updated to NodeBB v4.3 + New Features

Qt Creator opencv include problem

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 182 Views 2 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.
  • H Offline
    H Offline
    hevezolly
    wrote on last edited by
    #1

    Hello!

    I'm using QT Creator with opencv 3.4.15 for desctop and android. Not shure though if this question belongs to this forum, so excuse me if it's not.
    I'm adding opencv for android in .pro like so:

    INCLUDEPATH += D:\opencv\build_for_qt_android3\install\sdk\native\jni\include
    
        OPENCV3RDPARTYLIBS = D:\opencv\build_for_qt_android3\install\sdk\native\3rdparty\libs\armeabi-v7a
        OPENCVNATIVELIBS = D:\opencv\build_for_qt_android3\install\sdk\native\libs\armeabi-v7a
        OPENCVSTATIC = D:\opencv\build_for_qt_android3\install\sdk\native\staticlibs\armeabi-v7a
    
    
        LIBS += $$OPENCV3RDPARTYLIBS\liblibtiff.a
    
        LIBS += $$OPENCV3RDPARTYLIBS\liblibpng.a
        LIBS += $$OPENCV3RDPARTYLIBS\libittnotify.a
    
        LIBS += $$OPENCV3RDPARTYLIBS\libIlmImf.a
        LIBS += $$OPENCV3RDPARTYLIBS\libtegra_hal.a
    
        LIBS += $$OPENCV3RDPARTYLIBS\libcpufeatures.a
    
        LIBS += $$OPENCVSTATIC\libopencv_core.a \
        $$OPENCVSTATIC\libopencv_flann.a \
        $$OPENCVSTATIC\libopencv_imgproc.a \
        $$OPENCVSTATIC\libopencv_highgui.a \
        $$OPENCVSTATIC\libopencv_features2d.a \
        $$OPENCVSTATIC\libopencv_calib3d.a \
        $$OPENCVSTATIC\libopencv_ml.a \
        $$OPENCVSTATIC\libopencv_objdetect.a \
        $$OPENCVSTATIC\libopencv_photo.a \
        $$OPENCVSTATIC\libopencv_stitching.a \
        $$OPENCVSTATIC\libopencv_video.a \
        $$OPENCVNATIVELIBS\libopencv_java3.so \
    
        LIBS += $$OPENCVNATIVELIBS\libopencv_java3.so
    
        ANDROID_EXTRA_LIBS = $$OPENCVNATIVELIBS\libopencv_java3.so
        ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android-sources
    

    And when I try to include <opencv/core/core.hpp> I'm getting following Qt Creator warning:

    a24b90ac-e559-44cf-989d-5e48f7286ef7-image.png

    Despite this everything builds and works fine, but it's very annoying; I can't rely on Qt Creators code suggestions and opencv functions documentation since all core.hpp wasn't included properley. For the same reason qt creator marks correct code as incorrect:

    17b9ec81-618e-4e4c-ab0d-1ee0d2b3f398-image.png

    I know this might be not a big of an issue, but it spoils all workflow a lot. I would be very grateful if you could help me solve this problem.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      It's likely not related by still, use forward slashes in your .pro files (and code as well). Qt will do the correct conversion when needed.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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