Creating functions exposed to the global scope dynamically?

I guess you need to make a macro like what ModernGL.jl did here:

https://github.com/JuliaGL/ModernGL.jl/blob/f81e7ea6a1df8bff7fccd4708cd070fdf93e5ec5/src/functionloading.jl#L28-L71

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.

1 Like