Dear all,
I want to trigger OCaml compilation programmatically from a C++ application and avoid the usage of subprocesses. It is fairly straightforward to generate an OCaml AST, but I cannot compile it.
1. The relevant modules/libraries do not load
utop # #require "compiler-libs.optcomp";;
Error: Reference to undefined global `Location'
X86_masm.generate_asm stdout [] ;;
2. The relevant modules seem to insist on file i/o for communication (i.e., they use out_channel objects)