-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Currently, attempting to build the examples for web leads to the following error:
error: linker: Undefined symbol: glfwGetProcAddress(). Please pass -sGL_ENABLE_GET_PROC_ADDRESS at link time to link in glfwGetProcAddress().
This is because of the following breaking change in emscripten:
Breaking change: Using the *glGetProcAddress() family of functions now requires passing a linker flag -sGL_ENABLE_GET_PROC_ADDRESS. This prevents ports of native GL renderers from later accidentally attempting to activate "dormant" features if web browser implementations gain new WebGL extensions in the future, which *glGetProcAddress() is not able to support. (#20802)
that is documented here:
https://github.com/emscripten-core/emscripten/blob/main/ChangeLog.md#3151---121323
This change was introduced for emscripten 3.1.51.
The call to glfwGetProcAddress is located here:
raylib/src/platforms/rcore_web.c
Line 1236 in be0ea89
| rlLoadExtensions(glfwGetProcAddress); |
So, either platforms/rcore_web.c needs to be reviewed not to call glfwGetProcAddress, or adding the flag to compile commands needs to be documented. I'm not really sure which, so I'm opening this issue, so I can get input from others, and we can research together.