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

unnamed enum issue on macos #1

Closed
kcking opened this issue Jun 4, 2023 · 1 comment · Fixed by #2
Closed

unnamed enum issue on macos #1

kcking opened this issue Jun 4, 2023 · 1 comment · Fixed by #2

Comments

@kcking
Copy link
Contributor

kcking commented Jun 4, 2023

When using vst3-bindgen in a blank project, i get the following compilation error:

error: expected identifier, found `(`
  --> /Users/.../target/debug/build/vst3-bindgen-2dd1585f0690fcd4/out/bindings.rs:25:14
   |
25 |     pub type (unnamed enum at /Users/.../vst3sdk/pluginterfaces/base/funknown.h:189:1) = ::std::ffi::c_int;
   |              ^ expected identifier

It appears the unnamed enum is actually named (unnamed enum at /Users/.../vst3sdk/pluginterfaces/base/funknown.h:189:1) instead of being the empty string.

llvm 16.0.4 (installed with brew)
vst3sdk v3.7.7_build_19
macOS

@micahrj
Copy link
Contributor

micahrj commented Jun 4, 2023

It turns out this is happening because vst3-bindgen detects unnamed/anonymous declarations by checking if the name was an empty string, but libclang's behavior was changed in version 16 to start returning names like (unnamed enum at ...) instead. Bindgen had to fix the same issue a few months ago: rust-lang/rust-bindgen#2319

@micahrj micahrj closed this as completed in #2 Jun 4, 2023
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 a pull request may close this issue.

2 participants