Hi, I’ve already asked for help on reddit and the discord. I’m looking to link OCaml 4.14 programs with the Maude Solver using it’s SWIG bindings. The Maude folks have a cmake build system that generates a language-dependent .so
file that can link against various other languages. For OCaml, SWIG also generates .ml
and .mli
files. I believe I have to include these OCaml files with the rest of a project and then link against the .so
file, but I am confused on how to do this. I have tried several arrangements with dune following the foreign archives and foreign libraries pages, including specifying the .so file as a foreign_archive (although it’s a shared object file the documentation let me to believe this would work), but I can’t get dune to recognize the .so
file. Additionally, I wasn’t able to get ocamlopt outside of dune to recognize the .so
file despite the manual stating that it should be recognized (I get an error that it doesn’t know what to do with a .so
file). Any guidance on what to do would be greatly appreciated. Thanks.
2 posts - 2 participants