I guess you need to make a macro like what ModernGL.jl did here:
If your large C/C++ program does not use non-builtin datatypes(like OpenGL), then it’s ok to follow this way. Otherwise, you need to map datatypes, you could also make everything an opaque pointer though.