From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p9VIV8Nx011691 for ; Mon, 31 Oct 2011 19:31:08 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYBAAjprk7U436rkWdsb2JhbABDhHekPiIBAQEBCQsLBxQDIoFyAQEEASNWEAsOCgICJgICVwYTCYd5AgaiG5FvgTCGPoEUBIxQjGuMMw X-IronPort-AV: E=Sophos;i="4.69,433,1315173600"; d="scan'208";a="115893022" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail4-smtp-sop.national.inria.fr with ESMTP; 31 Oct 2011 19:31:08 +0100 Received: from office1.lan.sumadev.de (dslb-094-219-221-082.pools.arcor-ip.net [94.219.221.82]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MHKKd-1RGFnl1chv-00DTyB; Mon, 31 Oct 2011 19:31:06 +0100 Received: from [192.168.0.29] (dslb-084-058-005-118.pools.arcor-ip.net [84.58.5.118]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 8240CC00C7; Mon, 31 Oct 2011 19:31:05 +0100 (CET) From: Gerd Stolpmann To: David Allsopp Cc: Andreea Costea , "caml-list@inria.fr" In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 31 Oct 2011 19:31:03 +0100 Message-ID: <1320085863.14475.11.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:29bjVO1hDsBJ4vBzJpLD8zzhb1iyML7R42TTC755Hdf 0qlNWOmTH/tkCBrPiwPY8fIJHt4uAGcGHPR5lV3QH9XdwsKBKG 2wETZ3LA/bNgYb8mOq4J3DHMKXvLbQe5/vRS6Skn/TuNzpTbD2 YiNvquF07Sy/mxIwYHGpI33iuUeztJ3vs3ApDjDcoph8QUIDbw i/3wMtc72/K4Icoxo5voJ1EeqFII6djs1jSXY9JdbGnStJ+Ddd 7ImKKriBtIdiQKNZDh6j3Mk4RAXzaA/kEdWxkJfVLdChqgGyHv ZnuSfQjq2jMsqdRJnhX3oWRLF47Zhaxdv080SxSAcR3v97oY8C U1I0Bu7OoXgSOKND+u9hbWMc+ywEkCjieHCR3pN/U Subject: RE: [Caml-list] Standalone executable Am Montag, den 31.10.2011, 15:27 +0000 schrieb David Allsopp: > Andreea Costea wrote: > > For some days now, I was searching to see if there is any way you can build > > an executable from an OCaml project, that can later be run from another > > machine that doesn't have OCaml installed on (not even the runtime system). > > Same type of Unix based OS, though. > > Compile it with ocamlopt instead of ocamlc - Chapter 11 of the manual (which it's a little surprising you hadn't got to, if you've been looking for a few days)... http://caml.inria.fr/pub/docs/manual-ocaml/manual025.html > > "This chapter describes the OCaml high-performance native-code compiler ocamlopt, which compiles Caml source files to native code object files and link these object files to produce standalone executables." If you need to stay with ocamlc, you can also set the -custom option. In this case, the whole runtime system is included into the link, and the resulting executable only depends on the C libraries pulled in. Gerd > > > David > > > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. ------------------------------------------------------------