Skip to content
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

vendor:raylib: add options to link with raylib/raygui from system #4619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spitulax
Copy link

@spitulax spitulax commented Dec 24, 2024

Odin ships the libraries for raylib and raygui and links to them when using their bindings from vendor. But this does not play well with Nix, presumably because the libraries are not compiled for Nix.
To use vendor:raylib in Nix, you have to also compile the libraries for Nix and link with it.
This added options to link the libraries from system instead of the libraries shipped into the compiler.
May fix NixOS/nixpkgs#338972.

Comment on lines +8 to +10
when RAYGUI_SYSTEM {
foreign import lib "system:raygui"
} else when ODIN_OS == .Windows {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break on Windows.

Copy link
Author

@spitulax spitulax Jan 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RAYLIB_SYSTEM and RAYGUI_SYSTEM allow building in some systems that wouldn't accept bundled libraries like Nix. If you don't enable them on Windows it should just use the bundled libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Odinlang project fails to build, reason: ld cannot find <static libraries> no such file or directory.
2 participants