Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译demoui时关于glShaderSource函数的报错 #5

Open
meilizhongguo2 opened this issue Feb 20, 2024 · 1 comment
Open

编译demoui时关于glShaderSource函数的报错 #5

meilizhongguo2 opened this issue Feb 20, 2024 · 1 comment

Comments

@meilizhongguo2
Copy link

meilizhongguo2 commented Feb 20, 2024

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
@meilizhongguo2 meilizhongguo2 changed the title 编译demoui时关于SDL_PROC函数的报错 编译demoui时关于glShaderSource函数的报错 Feb 20, 2024
@xianjimli
Copy link
Member

你更新AWTK再试试,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants