Version française
Home     About     Download     Resources     Contact us    
Browse thread
Pre-compiled ocaml binary for windows
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Re: Pre-compiled ocaml binary for windows
On 12/07/2010 10:42 AM, Sylvain Le Gall wrote:
>> An option could be to ship a minimalistic main program, which simply
>> dynlinks .cmxs files given on its command line.
>>
>
> You mean like ld.ocaml:
> https://forge.ocamlcore.org/projects/ld-ocaml/

Or just something like:

let () =
    try
      for i = 1 to Array.length Sys.argv - 1 do
        Dynlink.loadfile Sys.argv.(i)
      done
    with exn ->
      Format.eprintf "Uncaught exception: %s@." (Printexc.to_string exn)

(untested, and you probably want to print the stack trace as well)


-- Alain