Version française
Home     About     Download     Resources     Contact us    
Browse thread
Calling OCaml from C - nothing shown on stdout
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andreas Sommer <AndiDog@w...>
Subject: Re: [Caml-list] Calling OCaml from C - nothing shown on stdout
David Allsopp wrote:
>
>
> As far as I can tell from the manual, there's no particular difference in native code between using caml_main and caml_startup. Your problem is the buffering of stdout in the OCaml runtime. There are two ways of working around this:
>   

The caml_main and caml_startup functions are indeed identical
(caml_startup only calls caml_main). You were right about the stdout
buffering, and I will use your flushed_printf solution. Thanks for your
help!

Andreas