Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build issues on Linux #28

@TSnake41

Description

@TSnake41

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions