Skip to content

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

Open
aokblast wants to merge 1 commit intoJuniper:mainfrom
aokblast:fix_libxo_extern_c_include
Open

libxo/*.h fix libxo header include when the source is C++#100
aokblast wants to merge 1 commit intoJuniper:mainfrom
aokblast:fix_libxo_extern_c_include

Conversation

@aokblast
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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