Ask Your Question
1

Unresolved inclusions in OpenCV android tutorial 4.

asked 2012-09-21 13:38:16 -0600

ZachTM gravatar image

Hi guys I am trying to get the android openCV tutorial 4 to mix native and java code. I followed all the steps but in the jni_part.cpp I am getting a bunch of errors:

Unresolved inclusion: <opencv2/core/core.hpp>
Unresolved inclusion: <opencv2/imgproc/imgproc.hpp>
Unresolved inclusion: <opencv2/features2d/features2d.hpp>
Unresolved inclusion: <vector>

Symbol 'std' could not be resolved
Symbol 'cv' could not be resolved

Type 'Mat' could not be resolved
Type 'FastFeatureDetector' could not be resolved

I think you get the point, there is basically one or more of these on every line. I tried cleaning the project, I tried this solution. and unfortunately it did not work. Does anyone know what I might be doing wrong? Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2012-09-21 14:31:14 -0600

njaa gravatar image

I had the same errors, but I don't know anymore how I solved it.

But these are my current settings which do work:

In the Project Properties:

  • Android -> Add the OpenCV Library
  • C/C++ build -> build command -> ${NDKROOT}/ndk-build (in Windows it's ndk-build.cmd I think)
  • C/C++ -> Environment -> add NDKROOT
  • C/C++ General -> Paths and Symbols -> Add the following:

    1. ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
    2. ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include
    3. ${ProjDirPath}/../../sdk/native/jni/include
    4. ${NDKROOT}/platforms/android-9/arch-arm/usr/include
edit flag offensive delete link more

Comments

This worked! Thank you so much for taking the time to write all this. I really appreciate it.

ZachTM ( 2012-09-21 15:55:59 -0600 )edit
1

I faced a simliar problem and solved it by adding additional path <path to>/opencv246-android-sdk/sdk/native/jni/include under "C/C++ General -> Paths and Symbols ->"

the step "Android -> Add the OpenCV Library" didn't solve it for my

pellekrogholt ( 2013-09-21 09:22:48 -0600 )edit

Thank You pellekrogholt. Adding the opencv lib path you mentioned solved the issu.

Nirmal ( 2014-11-24 04:29:45 -0600 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2012-09-21 13:38:16 -0600

Seen: 2,893 times

Last updated: Sep 21 '12