3

I'm creating a native android project using eclipse. I'm using opengl es 1.1.

I get this error when using a function from the glext.h file

Function 'glDrawTexfOES' could not be resolved

I'm using a function from gl.h right before i call the glDrawTexfOES. I'm able to use macros defined in the glext.h such as GL_TEXTURE_CROP_RECT_OES, so i know the file is included all right.

looking at the glext.h file, i found the function declaration i want, which is in an #ifdef block (#ifdef GL_GLEXT_PROTOTYPES). I defined GL_GLEXT_PROTOTYPES immediately before including glext.h, and i still have the same problem. I went into glext.h and edited it, first by commenting the ifdef and endif lines surrounding the functions i want. i still got the same error as above. then i copied the function declaration and pasted it at the top of the glext.h file, and my project still says it can't resolve that function.

I know glext.h is deprecated, but i should still be able to use it

iedoc
  • 2,266
  • 3
  • 30
  • 53
  • Does this error pop up during the compile or the link step? – Samveen Dec 10 '12 at 07:25
  • the link step, i can't compile the file because it says there's an error. originally the error was that the function was not declared in the scope, but i fixed that by defining GL_GLEXT_PROTOTYPES as "1" right before including glext.h. now i have an error of the function not being resolved... – iedoc Dec 10 '12 at 12:17
  • Could you add the the link command that is fired by `ndk-build` to the question. You can get that using `location/of/ndk-build V=1` or in this case, the equivalent of it in Eclipse. – Samveen Dec 11 '12 at 05:32
  • i forgot to mention i'm using windows 7. i'm also using ndk-build.cmd, and can't seem to get the information you requested from cygwin using v=1, where would i find it in eclipse? – iedoc Dec 11 '12 at 11:34
  • I'm on Linux without eclipse, so cant help much on how to get this info from Eclipse. However, I'm sure the build log must be stored somewhere, and there must be some option to give verbose output in the build log. – Samveen Dec 11 '12 at 14:54

1 Answers1

8

I had this same issue, but then put this in my Android.mk file:

LOCAL_CFLAGS += -D GL_GLEXT_PROTOTYPES

http://grokbase.com/t/gg/android-ndk/11cxrckjmp/ndkr7-cant-see-gldrawtexioes

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
mathieujofis
  • 349
  • 3
  • 16