Closed lessismordaunt closed 6 months ago
They're neither unmaintained nor just broken. The issue is that as of now, ocaml-ctypes
does not support cv-qualifiers. Thus, strings in binding code are always char*
instead of const char*
, which leads to a warning (-Wincompatible-pointer-types
). There is a issue in the ctypes repo, which goes back to 2014 (https://github.com/yallop/ocaml-ctypes/issues/134).
Recently, gcc14 turned this warning into an error (see https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors). Am I correct in assuming that's the version you are on?
Unfortunately, I don't know how to work around this without explicit support for const
in ctypes. In another issue, the author called the warning "unavoidable" (for now, https://github.com/fdopen/ppx_cstubs/pull/6#issuecomment-898294186).
Maybe we could patch raygui to change the declaration.. I'll see if this is feasible.
Until then, you could try to compile with an older version of gcc.
Patching raygui seems to work. The last commit should build for you. I'll leave the issue open until I have published the fix on opam.
The
raygui
bindings seems either unmaintained or just broken: