# CxxWrap cannot wrap structure on dev. version of Julia?

**URL:** <https://discourse.julialang.org/t/cxxwrap-cannot-wrap-structure-on-dev-version-of-julia/86423>\
**Category:** New to Julia\
**Tags:** cxxwrap\
**Created:** [August 27, 2022, 9:59am UTC](https://discourse.julialang.org/t/cxxwrap-cannot-wrap-structure-on-dev-version-of-julia/86423 "2022-08-27T09:59:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nabla/32/26089_2.png) [@nabla](https://discourse.julialang.org/u/nabla)\
**Post date:** [August 27, 2022, 9:59am UTC](https://discourse.julialang.org/t/cxxwrap-cannot-wrap-structure-on-dev-version-of-julia/86423/1 "2022-08-27T09:59:31Z")

</div>

I built, and tried to run, CxxWrap with the latest (github) version of Julia, Version 1.9.0-DEV.1189 (2022-08-26). I could build the example “testlib.cpp”, but ran into two problems:

- the structure doesn’t seem to be wrapped correctly: I get

```julia
C++ exception while wrapping module XXX: invalid subtyping in definition of MyStruct with supertype Any
ERROR: LoadError: invalid subtyping in definition of MyStruct with supertype Any

```

- If I comment out the MyStruct line, I can compile and load the module; but the function greet() returning a string does not return a printable string, but rather a pointer:

```julia
julia> XXX.greet()
ConstCxxPtr{CxxChar}(Ptr{CxxChar} @0x000000010d546e3a)

```

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [August 27, 2022, 10:21am UTC](https://discourse.julialang.org/t/cxxwrap-cannot-wrap-structure-on-dev-version-of-julia/86423/2 "2022-08-27T10:21:07Z")

</div>

Did you try the latest version of CxxWrap (0.12.1), released 4h ago?

If that doesn’t help can you create an issue at

> **[Issues · JuliaInterop/CxxWrap.jl](https://github.com/JuliaInterop/CxxWrap.jl/issues)**
>
> Package to make C++ libraries available in Julia. Contribute to JuliaInterop/CxxWrap.jl development by creating an account on GitHub.

?
