Ask Your Question
2

Unresolved inclusion in OpenCV+Android tutorial

asked 2012-06-26 09:46:09 -0600

icedecker gravatar image

Hi,

I have followed the tutorial to run the mixed native code and java, installed the ndk stuff, and it works nicely. But in the files at jni directory the Eclipse always show a "Unresolved inclusion: <jni.h>" and other unresolved messages like as "Unresolved inclusion: <opencv2 core="" core.hpp="">".

I have searched on the net, and says that I should include, in c/c++ properties. But the tutorial examples of OpenCV+Android are not c++ projects. C/C++ perspective does not apply to these projects and I don't find in any place of Eclipse how to include, even switching to c/c++ perspective. I have the plugin cdt installed.

How I could handle it? Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
3

answered 2012-07-09 07:45:02 -0600

Andrey Pavlenko gravatar image

If you open Proj Prop-s -> C/C++ General -> Paths and Sympols -> Include tab, you'll find that the project has already some include dir-s set up, but that's not enough...

I managed to fix the code indexer errors by adding one more include dir there: press Add... -> paste the following path ${NDKROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include, check Add to all cfg and press OK, agree to re-indexig.

edit flag offensive delete link more

Comments

This solution is much better than my answer, thanks! It worked nicely.

icedecker gravatar imageicedecker ( 2012-07-09 15:18:37 -0600 )edit

Hello, i have the same problem, this solution doesn´t work for me, please could anyone suggest any solution? Thank you in advanced

forio gravatar imageforio ( 2014-06-03 12:36:28 -0600 )edit

This works for std:string issues :).. but i still get a float.h error .. anyway i could resolve that? (+1 tho)

Dhara Shah gravatar imageDhara Shah ( 2014-07-03 06:42:54 -0600 )edit
0

answered 2012-06-27 11:08:27 -0600

icedecker gravatar image

The following link at stackoverflow solves the problem. I get rid of the unresolved stuff, but a bunch of gcc errors appears. Anyway, for this specific question, is solved.

edit flag offensive delete link more

Comments

If you think that your issue resolved, could you please accept your own answer?

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-02 10:56:09 -0600 )edit

Question Tools

Stats

Asked: 2012-06-26 09:46:09 -0600

Seen: 6,266 times

Last updated: Jul 09 '12