I am trying to make a wrapper using Clang for a c library that has a struct that contains enum in field. Here is a MWE test.h
for the struct:
typedef struct {
float a;
enum {ONE, TWO} b;
} Test;
and Clang script:
using Clang
const HEADERS = ["test.h"]
wc = init(; headers = HEADERS,
output_file = joinpath(@__DIR__, "test_api.jl"),
common_file = joinpath(@__DIR__, "test_common.jl"),
clang_includes = [CLANG_INCLUDE],
clang_args = [""],
header_wrapped = (root, current)->root == current,
header_library = x->"libtest",
clang_diagnostics = true,
)
run(wc)
With these I get an error
[ Info: wrapping header: test.h ...
┌ Warning: Skipping struct: "CLCursor (CLStructDecl) " due to unsupported field: CLCursor (CLEnumDecl)
└ @ Clang ~/.julia/packages/Clang/eb0em/src/wrap_c.jl:158
[ Info: writing /home/kjwiik/proj/Difmap/gen/test/test_api.jl
What is CLCursor
struct?
Any suggestions how to get this working?