android - 我的 native C++ Android 程序中缺少 glShaderModel 库

标签 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

最佳答案

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

尝试链接 libGLESv1_CM

关于android - 我的 native C++ Android 程序中缺少 glShaderModel 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16628127/

相关文章:

java - 从 JNI 中编码数据的最快方法是什么

Android NDK 内存使用

android - 编译.c库Eclipse for Android错误

android - 无法点击 AdMob 插页式广告

android - Cocos2dx 安卓构建错误: "arm-linux-androideabi-g++: No such file or directory"

c++ - 使用 ifstream while 循环,如何显示输入错误并在下一行继续?

c++ - 强制 QPlainTextEdit 大写字符

android - 使用 Android makefile 构建系统构建 Android 应用程序测试代码时,编译器找不到 AndroidInstrumentationTestCase2

android - 无法在 'Android L' 模拟器上使用 OkHttp 运行应用程序

c++ - 前置条件通常与不变量重叠吗?