-
Notifications
You must be signed in to change notification settings - Fork 747
Multiple definitions #1693
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
Comments
How are these defined in your system? Your header doesn't include those constants... This looks like a dupe of #687, where we have both a macro and an anonymous enum with the same name. Bindgen can't quite now what to generate and generates both. You can instruct bindgen to generate the variant you want as described in that issue. |
...I thought because those constants were not part of the header, that bindgen added them for some reason. Since the header does not contain FP_* symbols, it is hard to figure out what the header is defining twice. I think the header is indirectly tricking bindgen into defining FP_* twice. |
Bindgen generates everything by default, you need to whitelist (which is recursive by default) or blacklist stuff to limit the output. |
Uh oh!
There was an error while loading. Please reload this page.
I have a really rough looking header (it's amalgamation).
https://github.com/TomzBench/mongoose-rs/blob/master/mongoose-sys/wrapper.h
Mongoose is a pretty popular single threaded web server for embedded systems written in C. So I went to try and make a binding to it and when I compile it I get a few errors such as seen below. (My repository is pretty minimal to reproduce.)
The culprit is defined first as:
Then it is redefined again some 5000 lines later as
It looks like __bindgen_ty_8 is a u32 so they are defined as equal - but still produces error.
(also If I copy out the binding.rs and delete the duplicate's then it does compile ok...)
The text was updated successfully, but these errors were encountered: