From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id E77E4BBAF for ; Tue, 7 Dec 2010 10:49:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am4BANqR/UzB/BfWlGdsb2JhbACjUAEBAgkLEREDH8B2hUkEinGDEw X-IronPort-AV: E=Sophos;i="4.59,310,1288566000"; d="scan'208";a="70047139" Received: from msa05.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.214]) by mail3-smtp-sop.national.inria.fr with ESMTP; 07 Dec 2010 10:49:15 +0100 Received: from [192.168.1.63] ([83.199.119.237]) by mwinf5d20 with ME id g9pE1f00l57QgZP039pFK1; Tue, 07 Dec 2010 10:49:15 +0100 Message-ID: <4CFE031A.6060801@frisch.fr> Date: Tue, 07 Dec 2010 10:49:14 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Sylvain Le Gall Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Pre-compiled ocaml binary for windows References: <20101203200646.GA7445@malaquias.DHCP-GERAL> <6C7D3CF0-5C04-4E51-939F-5086244DA055@inria.fr> <4CFD2259.6060200@gmail.com> <4CFDEE7E.8030000@frisch.fr> <4CFDFEA5.3000900@frisch.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 pre-compiled:01 ocaml:01 ocaml:01 argv:01 dynlink:01 loadfile:01 argv:01 exn:01 eprintf:01 uncaught:01 printexc:01 exn:01 wrote:01 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