Glext.h function not resolved

I am creating my own android project using eclipse. It uses opengls 1.1.

I have a problem with functions defined in "glext.h". I can use macros defined in "glext.h", but when I try to use any function defined in "glext.h", it says that it cannot solve this function.

I know glext.h is deprecated, but I follow along with the book and I would like it to work. I used the source code of the book and had the same problem.

What can I do to use the functions defined in glext.h?

+4
source share
1 answer

When you include the header file, you get only what is in that header file. In your case, you get macros that are fully included in the header file, and function declarations. Those simply declare that the function exists, this is not the actual code that is the definition of the function.

To access the actual functions (definitions), you need to establish a connection with the library. An error in unresolved functions means that the compiler knows that the function exists, but the linker does not know where to find it.

I think your solution may simply be related to the OpenGL ES 1.x library. To do this, check the Android.mk file and make sure that the line where LOCAL_LDLIBS is installed includes -lGLESv1_CM . Like this:

 LOCAL_LDLIBS := -llog -ldl -lGLESv1_CM 

This links the registrar, dynamic linker, and OpenGL ES 1.x libraries.

I get information from here . I could not find the canonical source on Google.

+2
source

All Articles