Open meilizhongguo2 opened 8 months ago
windows系统版本:win11 android-studio-2023.1.1.28-windows jdk-17_windows-x64_bin android sdk的版本:android 14.0 API34 android ndk的版本:26.2.11394342
编译demoui时会提示如下错误:
D:/awtk-android/awtk-android/build/demoui/app/src/main/cpp/awtk/3rd/SDL/src/render/opengles2/SDL_render_gles2.c In file included from D:/awtk-android/awtk-android/build/demoui/app/src/main/cpp/awtk/3rd/SDL/src/render/opengles2/SDL_render_gles2.c:304: D:/awtk-android/awtk-android/build/demoui/app/src/main/cpp/awtk/3rd/SDL/src/render/opengles2/SDL_gles2funcs.h:58:1: error: incompatible function pointer types assigning to 'void (*)(GLuint, GLsizei, const GLchar **, const GLint *)' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-function-pointer-types] SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *)) ^ ~~~~~~~~~~~~~~ D:/awtk-android/awtk-android/build/demoui/app/src/main/cpp/awtk/3rd/SDL/src/render/opengles2/SDL_render_gles2.c:293:45: note: expanded from macro 'SDL_PROC' #define SDL_PROC(ret,func,params) data->func=func; ^~~~~ 1 error generated. ninja: build stopped: subcommand failed.
检查发现是 awtk/3rd/SDL/src/render/opengles2/SDL_gles2funcs.h的57行处:
#if __NACL__ || __ANDROID__ SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *))//开放的是这个函数类型 #else SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *))//实际调用的却是这个函数类型 #endif
你更新AWTK再试试,谢谢。
windows系统版本:win11 android-studio-2023.1.1.28-windows jdk-17_windows-x64_bin android sdk的版本:android 14.0 API34 android ndk的版本:26.2.11394342
编译demoui时会提示如下错误:
检查发现是 awtk/3rd/SDL/src/render/opengles2/SDL_gles2funcs.h的57行处: