hwaterfall | 10 Oct 06:06 2013
Picon

Resolving #include issues

Not sure whether this is an NDK problem, an eclipse problem or something else, but it's driving me crazy! I figure anyone following this group will likely have an answer... 

OS: Windows 7
SDK: adt-bundle-windows-x86-20130717
NDK: android-ndk-r8e
Eclipse ADT: Build: v22.0.4-741630

I'm trying to render a bitmap using openGL in JNI, but I'm having more fundamental problems than that: I can't seem to configure the build so that it knows where the include files are!
 
I'm following this example which is nice and simple. I'm calling functions such as glClearColor() and glClear(). I noticed the gl* functions are being reported as "Write occurrence of <gl*>", which suggests to me (the neophyte) that there's a configuration issue, but everything built and ran as expected. I guess the linker just "figured it out". The problem comes when I try to use glTexImage2D(): parameters such as GL_TEXTURE_2D are reported as "could not be resolved", so now it doesn't build. Here's the frustrating part. I have the headers declared at the top of the file:
#include <android/bitmap.h>
#include <GLES2/gl2.h>

The C/C++>General>Paths and Symbols properties for the project has this path:
C:\Android\android-ndk-r8e-windows-x86\android-ndk-r8e\platforms\android-9\arch-arm\usr\include

I've confirmed that android & GLES2 folders exist at that path location and each contain the appropriate .h file (bitmap.h and gl2.h respectively). Even more mysteriously, functions and variables that are defined in bitmap.h such as AndroidBitmap_getInfo() and ANDROID_BITMAP_FORMAT_RGB_565 don't cause a problem. I get a usage tool tip when I hover over AndroidBitmap_getInfo and I get the value of ANDROID_BITMAP_FORMAT_RGB_565 when I hover over that. How can that it be that bitmap.h resolves but gl2.h doesn't? I'm declaring the includes exactly the same way!

Any troubleshooting tips?

Thanks,
Howard

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe <at> googlegroups.com.
To post to this group, send email to android-ndk <at> googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/groups/opt_out.

Gmane