-
Notifications
You must be signed in to change notification settings - Fork 68
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
Error on undefined typedef union #214
Comments
Maybe related to #55. |
that's because opaque union typedefs were not handled correctly. |
Thanks for your proper fix, I will try again with your branch. |
@Gnimuc I tried running my script again using your branch
Here,
The line at level 6 is indeed a little strange: In Maybe I got something wrong, but I could not find an example or test that uses |
oh, nice catch. I forgot to update the @leethargo |
note, you should replace LIBCLANG_INCLUDE with your lib's header path: wc = Clang.init(
headers=[joinpath(header_path, h) for h in headers],
header_wrapped = (root, current) -> root == current,
header_library = x -> "libscip",
common_file="common.jl",
output_dir="../src/wrapper",
clang_includes = vcat(header_path, LLVM_INCLUDE),
clang_args = ["-I", header_path],
clang_diagnostics = true,
) |
- see PR JuliaInterop/Clang.jl#210 - and discussion at JuliaInterop/Clang.jl#214
Thanks again. I might look into the tutorial later, when I need more fine-grained control, but your snippet already helped me generate a wrapper for the whole set of headers I care about! I thought that |
Exactly. Here is another hint for generating a template wrapper project: copydeps(dirname(api_file))
print_template(joinpath(dirname(api_file), "LibTemplate.jl")) |
I have something like this in my C header (similar to #58):
When I try to wrap this, I actually get an error:
The problem seems to be that
largestfield
tries to return accessfields[0]
whilefields
is actually empty:The text was updated successfully, but these errors were encountered: