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

Add shared library build option for build.zig and update to zig 0.12.0-dev.2139 #3727

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

candrewlee14
Copy link
Contributor

@candrewlee14 candrewlee14 commented Jan 11, 2024

Using raylib as a shared library was helpful for hot-module reloading, allowing both the main executable and shared game library to link with raylib and then we can reload without segfaulting. I needed the no-sanitize flag to work around an illegal instruction error.

Here is the source for that example: https://github.com/candrewlee14/tetris-raylib

@raysan5 raysan5 merged commit b7141d5 into raysan5:master Jan 13, 2024
@raysan5
Copy link
Owner

raysan5 commented Jan 13, 2024

@candrewlee14 It seems this PR is related to this one: #3680 but your implementation seems simpler. I'm merging it.

@Peter0x44
Copy link
Contributor

@candrewlee14 shouldn't this be defining BUILD_LIBTYPE_SHARED and also passing -fvisibility=hidden?

@Peter0x44
Copy link
Contributor

Nevermind, it does that
Not sure how I missed it - my bad

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.

3 participants