Qt Creator opencv include problem
-
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: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: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.
-
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.