-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pure virtual functions generate bogus link_name. #1197
Comments
Can you put an example? In general disabling name mangling is only supported to workaround old clang bugs in C, like #528. |
I am using steamworks sdk. Here is some snippet of a header file.
Here is the relevant generated rust code. It fails to link with test program.
If i inspect the supplied library with the sdk.
I had to patch the generated code prefixing link_name with SteamAPI_$CLASS. |
Oh ok, so the problem here is two. First of all we generate a link name for a pure virtual method, which is wrong. Then there's the long-standing problem that we don't support generating vtables properly, because of C++ compiler differences. Let's fix the first one since at least that will fix the linking error. |
Don't generate symbols for pure virtual functions. Fixes #1197.
Hello,
I am using bindgen to generate code from C++ headers and if i disable name mangling the resulting link_name for functions just become
function_name
, but the library symbols are of formsomeprefix_classname_function_name
. I am assuming it's a bit of namespace issue. Is there any way to achieve this?The text was updated successfully, but these errors were encountered: