在我的原生C ++ Android程序中缺少glShaderModel的库

时间:2013-05-18 19:24:21

标签: android c++ android-ndk opengl-es-2.0

我不确定我需要为此错误添加哪个库:

../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/objs/PhysicsLessons/PhysicsLessons.o: in function 
engine_handle_cmd(android_app*, int):jni/PhysicsLessons.cpp:104: error: undefined reference to 'glShadeModel'

在Android.mk中我有这个:

LOCAL_LDLIBS    := -lm -lEGL -lGLESv2 -llog -landroid 
LOCAL_STATIC_LIBRARIES := android_native_app_glue

在Application.mk中,我是APP_PLATFORM=android-10

我正在使用ndk8e

1 个答案:

答案 0 :(得分:7)

您正在链接OpenGL ES2.0库,该库没有固定管道。 glShadeModel不在那里。检查gl2.h header

尝试链接libGLESv1_CM