Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2010-06-29 (12:45)
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