I have an Android NDK project whose NDK part compiles ok from command line; I used to have no problems with running the compiled stuff from under Eclipse as a pure Java project.
How it can be ignored: open 'Problems' window, select errors in c/c++ files and press Del key. A confirmation msg box will be shown, but after that you can debug your app... until next rebuild =) Alternatively, as you mentioned earlier, you can just close all opened c/c++ files.
The configuration of CDT indexer needs to enable "Index unused headers ..."
How to get there: Project->Properties->C/C++ General->Indexer.
Gets rid of the error for me.
In your Android.mk file, please add
LOCAL_LDLIBS := -llog -landroid
The __android_log_print
isn't part of libc, it's in the log library, so you need to explicitly declare it to be linked in.
Note the eclipse will refuse to run the project if there's errors on either the C or java side. In this case, there's a linker error; the code didn't successfully finish compiling, so it won't run it.
alternatively you can retype these strings and restart an Eclipse; All these fixes sounds lame though...