First, rayfork refuses to compile with sokol because glad is imported after sokol, which includes it's own GL, which makes glad refusing to compile, as OpenGL is already imported.
To fix it, you need to include glad before sokol in `https://github.com/SasLuca/rayfork/blob/rayfork-0.9/tests/platform-independent-tests/platform-layers/sokol/sokol-main.c#L8
Another issue is missing symbols (as required by e.g sokol).
- math stuff is missing (you mostly want it, doesn't affect musl targets) : libm needs to be imported
target_link_libraries(m), this affect directly rayfork.h
- Xorg stuff (only with X11 target) :
target_link_libraries(X11 Xi Xcursor)
- dlopen/dlclose/... :
target_link_libraries(dl)
- pthread (or crash at launch) :
target_link_libraries(pthread)
All of them gives target_link_libraries(m dl pthread X11 Xi Xcursor)
First, rayfork refuses to compile with sokol because glad is imported after sokol, which includes it's own GL, which makes glad refusing to compile, as OpenGL is already imported.
To fix it, you need to include glad before sokol in `https://github.com/SasLuca/rayfork/blob/rayfork-0.9/tests/platform-independent-tests/platform-layers/sokol/sokol-main.c#L8
Another issue is missing symbols (as required by e.g sokol).
target_link_libraries(m), this affect directlyrayfork.htarget_link_libraries(X11 Xi Xcursor)target_link_libraries(dl)target_link_libraries(pthread)All of them gives
target_link_libraries(m dl pthread X11 Xi Xcursor)