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 support for enum "C" #15

Open
giannishatzo opened this issue Feb 17, 2023 · 2 comments
Open

Add support for enum "C" #15

giannishatzo opened this issue Feb 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@giannishatzo
Copy link

I'm trying to wrap a library which includes both C and C++ header files. Is there a way to make this configuration work with wrapit?
C headers are embedded in an extern "C" {} structure, but when trying to run wrapit on it, the result is 0 enums, classes, etc.

@grasph
Copy link
Owner

grasph commented Feb 20, 2023

Hello Giannis,

You can wrap such libraries with the current version, by removing the extern "C" from the headers passed to WrapIt. Once the code generated, you should use the original header files to compile it.

The direct support for extern "C" may eventually be added. The libclang library used to parse the c++ code does not seem to support this directive making the implementation more difficult that it should.

Philippe.

@giannishatzo
Copy link
Author

Hi Philippe

Thanks a lot, this sounds promising. I'll give it a try as soon as I find the time and I'll let you know.

Giannis

@grasph grasph added the enhancement New feature or request label Mar 11, 2023
@grasph grasph changed the title Is it possible to wrap mixed C/C++ libraries? Add support for enum "C" Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants