Dear all,

I managed to manually link and run an object file generated by ocamlopt. A small part seems to be missing, however:

➜  llvmlink ocamlfind opt -package ANSITerminal -linkpkg -verbose -output-obj -o test.object.o test.ml

➜  llvmlink clang -I$(ocamlc -where) -lm wrapper.c test.object.o -o wrapper ~/.opam/4.04.0/lib/ocaml/libunix.a -ldl ~/.opam/4.04.0/lib/ocaml/libasmrun.a /home/choeger/.opam/4.04.0/lib/ANSITerminal/libANSITerminal_stubs.a

These commands produce an executable output, but the screen remains empty. This changes, when I manually flush the stdout buffer in the code (I obtain the desired results then).

Find attached the test sources. When I uncomment the Printf.printf in test.ml, everything seems to work fine. But when I compile the test using ocamlopt solely, this is not necessary. It seems some buffers do not get flushed here. Does anyone know, why?

regards,

Christoph