-
Notifications
You must be signed in to change notification settings - Fork 738
wrong link_name for msvc #578
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
Which clang version are you using? You can workaround this with |
I can not, with/without this option it generates the same:
|
Whoopsies, that's my fault. Could you confirm it works with #579? Also, I'm intrigued by this anyway, given we used to have this remove first underscore of the mangling thing also for windows (see https://github.com/servo/rust-bindgen/blob/master/src/ir/function.rs#L133), but it was removed because it seemed no longer necessary... Does |
Yes, with
It works on my host machine (with linux) without #579, and it failed on windows inside virtualbox with #579:
|
I think all that is required to repro is this: // bindgen-flags: -- --target i686-pc-windows-msvc
extern void test(void); |
Duping this to #541 which is the same root issue but has more discussion. |
Input C Header
Bindgen Invocation
Actual Results
Expected Results
linking without any errors.
Hint the problem in two underscores instead of one,
looks like rustc (at least 1.16) smart enought to add "_" to names.
So if remove
#[link_name = "_test"]
all works fine,but I can not find option to strip
link_name
from output.The text was updated successfully, but these errors were encountered: