Skip to content

add workaround for linkLibCpp (fixes SDL2 example) #30

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

Merged
merged 1 commit into from
Apr 6, 2025

Conversation

silbinarywolf
Copy link
Owner

@silbinarywolf silbinarywolf commented Apr 6, 2025

Description

add workaround for linkLibCpp() not working with Zig 0.14.0 stable.
This fixes the SDL2 example for now.

How it works

  • Find any artifacts that have link_libcpp = true
  • Make a copy of that Android's target c++abi library called c++abi_zig_workaround (to work around link_libcpp detection)
  • Link that as a system library
  • Change link_libcpp = false
  • Finally, if any nested dependencies are causing the current artifact to depend on c++abi_zig_workaround, then make sure the current artifact has the library path to the copy.

Screenshot

image

@silbinarywolf silbinarywolf merged commit 17aa647 into main Apr 6, 2025
3 checks passed
@silbinarywolf silbinarywolf deleted the fix/workaround-zig-link-cpp-bug branch April 6, 2025 10:18
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.

1 participant