# Wrapping a library with enum in struct

**URL:** <https://discourse.julialang.org/t/wrapping-a-library-with-enum-in-struct/40582>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/wrapping-a-library-with-enum-in-struct/40582 "2020-06-01T20:47:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [June 1, 2020, 8:47pm UTC](https://discourse.julialang.org/t/wrapping-a-library-with-enum-in-struct/40582/1 "2020-06-01T20:47:58Z")

</div>

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:

```nohighlight
typedef struct {
  float a;
  enum {ONE, TWO} b;
} Test;

```

and Clang script:

```julia
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

```julia
[ 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?
