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 -ObjC link flag to fix OSX crashes #332

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

kesyog
Copy link
Contributor

@kesyog kesyog commented Dec 22, 2024

Add -ObjC link flag when building on OSX. As noted in SFML/SFML#2920, this is required when statically linking against SFML since it contains Objective-C source files. Without this flag, compiling and linking succeeds but binaries will crash at runtime.

Add `-ObjC` link flag when building on OSX. As noted in
SFML/SFML#2920, this is required when
statically linking against SFML since it contains Objective-C source
files. Without this flag, compiling and linking succeeds but binaries
will crash at runtime.
@kesyog
Copy link
Contributor Author

kesyog commented Dec 22, 2024

Unfortunately, it seems that due to rust-lang/cargo#9554, this link flag isn't propagated to downstream users, but this change at least lets me run the examples within this crate.

Until a workaround is found, perhaps we should document in the README or Wiki that downstream OSX users should add this to their build scripts?

@crumblingstatue
Copy link
Collaborator

I have no way to test OS X personally, but CI passes, so looks good to me.

Until a workaround is found, perhaps we should document in the README or Wiki that downstream OSX users should add this to their build scripts?

Feel free to edit the wiki, or submit a documentation pull request.

Thank you for your contribution!

@crumblingstatue crumblingstatue merged commit 832bdb5 into jeremyletang:master Dec 23, 2024
3 checks passed
@kesyog kesyog deleted the static-osx branch December 24, 2024 03:41
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.

2 participants