From 71ae72758bce5c760f112872b050a9bcd1f847eb Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 28 Jan 2025 20:07:39 +0800 Subject: [PATCH] add extern "C" guard in loader.h --- src/main/cpp/gles/loader.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/cpp/gles/loader.h b/src/main/cpp/gles/loader.h index c35c24c..4f65f88 100644 --- a/src/main/cpp/gles/loader.h +++ b/src/main/cpp/gles/loader.h @@ -9,10 +9,22 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + extern void *(*gles_getProcAddress)(const char *name); + void *proc_address(void *lib, const char *name); + extern void *gles, *egl; +#ifdef __cplusplus +} +#endif + +void init_target_gles(); + #define WARN_NULL(name) if (name == NULL) { LOG_W("%s line %d function %s: " #name " is NULL\n", __FILE__, __LINE__, __func__); } #define PUSH_IF_COMPILING_EXT(nam, ...) \ @@ -70,6 +82,4 @@ GLAPI GLAPIENTRY type name(__VA_ARGS__) { \ #define LOAD_EGL(name) LOAD_LIB(egl, name) -void init_target_gles(); - #endif // _MOBILEGLUES_LOADER_H_