My problem with eclipse c++ project that eclipse could not resolve extern functions, namespaces, variables, etc... Please, see the screenshot.
So, for example jni type jint
is not resolved by eclipse, but, as you can see jni.h
is included and resolved (I can CNTRL+click on it and view its content), I've set up all needed include path, so all files are included as they supposed to, but eclipse doesn't resolve entities from them.
Where the problem might be there?
PS. I'm a newbbie in the c++ development with eclipse, so I might miss something, please help me, I'll appreciate it a lot.
Thanks.
You also need to tell Eclipse where you JNI library is.
If you've never done this, see this wiki entry. The section on linking has pictures and arrows and text that should walk you through the process.
Some general advice: Learn to distinguish between compiler errors and linker errors. If it's a compiler error, then you can look for missing include files etc. When it's a linker error it means it compiled and found all the headers just fine but when it went looking for the actual object to link to it couldn't find it. That typically means you have a library path issue to resolve.
One final warning, I have seen Eclipse change the toolchain settings all by itself, I wrote this up in a blog entry if you want to see the one settings panel I now always avoid.