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

libxo/*.h fix libxo header include when the source is C++ #100

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

Conversation

aokblast
Copy link

@aokblast aokblast commented Dec 5, 2024

C++ needs extern C to disable C++ name mangling.
To use libxo in C++ it is better to include extern "C" guardian

@philshafer
Copy link

Could you explain why you are wanting the C++ magic on files like xo_private.h and xo_explicit.h? These are internal/private files and should never be included by external c++ files.

Thanks,
Phil

C++ needs extern C to disable C++ name mangling.
To use libxo in C++ it is better to include extern "C" guardian
@aokblast aokblast force-pushed the fix_libxo_extern_c_include branch from 657d3d9 to 93dfdab Compare January 11, 2025 13:01
@aokblast
Copy link
Author

aokblast commented Jan 11, 2025

Sorry for misuse extern "C" in code, I just try modifying all header until my code successfully compiled. Fix it right now!

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