ocaml-ctypes icon indicating copy to clipboard operation
ocaml-ctypes copied to clipboard

Generating stubs that uses dynamic libraries

Open braibant opened this issue 10 years ago • 2 comments

We are investigating some strange behaviours of one of our bindings on Windows. Our bindings currently use the Foreign approach, and we would like to turn to Cstubs. It is not clear however how to use dynamic libraries in that context, and that is making the switch difficult.

We could probably write some code in C that would handle the dynamic library loading in a different manner on Linux or Windows. This C part would register all the functions that are later used by the Cstubs generated part. This looks painful and error-prone.

Is there any way to avoid this? Should we look for another code generator like the one of Cstubs or Cstubs_inverted?

(cc @hhugo)

braibant avatar Oct 23 '14 13:10 braibant