-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[build] Cannot use GLFW runtime platform detection #3850
Comments
I am concerned that elimination of |
It looks like modifying the bundled GLFW by adding platform-specific suffixes to the functions with conflicting names is an easier solution than removing |
I prefer to keep In any case, how does CMake/GLFW resolve this same issue? Because build process is also supposed to compile and link all those symbols with the same name. |
When building with CMake, instead of using Anyway, keeping |
The big new feature of GLFW 3.4 is runtime platform detection, which enables a single Linux executable to run on both X11 and Wayland. However, raylib cannot use this feature at the moment when built using the Makefile or Zig, although it works when raylib is built using CMake.
The reason is because the Makefile and Zig use the file
rglfw.c
, which is not used by CMake, andrglfw.c
combines all of GLFW's source files needed for a single platform selected at build time into one file. However, it is not possible to include multiple platforms into a single source file because GLFW has some static functions with the same name in source files for different platforms. Moreover, GLFW expects the "null" platform to be always present but we cannot include it for the same reason.Maybe we should get rid of
rglfw.c
and have the Makefile and Zig select the GLFW source files to be built.This problem has been previously reported here: #3827 (comment).
The text was updated successfully, but these errors were encountered: