Skip to content

Fix C++ linking (#981) #131

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
Feb 22, 2025
Merged

Fix C++ linking (#981) #131

merged 1 commit into from
Feb 22, 2025

Conversation

zaidoon1
Copy link
Owner

  • Fix C++ linking

Hard-coding the C++ library linking is bad practice, and instead this crate needs to follow the practices as described under https://docs.rs/cc/1.2.14/cc/index.html#c-support.

Without doing so, this crate will not compile on when using libc++ instead of libstdc++.

This change will keep the existing behaviour, while allowing downstream consumers of this crate to override the C++ library with the CXXSTDLIB which is respected by the cc crate.

* Fix C++ linking

Hard-coding the C++ library linking is bad practice, and instead this
crate needs to follow the practices as described under
https://docs.rs/cc/1.2.14/cc/index.html#c-support.

Without doing so, this crate will not compile on when using libc++
instead of libstdc++.

This change will keep the existing behaviour, while allowing downstream
consumers of this crate to override the C++ library with the `CXXSTDLIB`
which is respected by the cc crate.
@zaidoon1 zaidoon1 merged commit fd3c716 into master Feb 22, 2025
18 checks passed
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