I want to use a library built as a .a
file in my dune project (exposing some needed functions...), but the dune documentation specifies only how to use foreign C code.
How can one use a non-C built library with dune?
What I am currently trying to do (I can't see how to apply the process of the documentation with a non-C generated program):
Part of my dune
file:
(foreign_archives ../bin_jasmin/TESTS)
My main program:
module ForeignFuncs = struct
open Ctypes
open Foreign
let test_ADCX =
foreign "test_ADCX"
(ocaml_bytes @-> ocaml_bytes @-> uint64_t @-> uint64_t @-> uint8_t
@-> returning void)
end
p.s.: I already used this library with Ctypes, compiling with ocamlopt and it worked just fine. For those curious, this is about using Jasmin