From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 37C8E7ED9B for ; Mon, 19 May 2014 09:56:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwFALm3eVNbeUeT/2dsb2JhbABZgwZRg0HBGQGBDxZ0giUBAQUjVhALGAICBRMOAgIPBRgdAROIWK0rpBsXgSqNJgeCdTaBFQSZWQGBPZFdgzk7 X-IPAS-Result: AmwFALm3eVNbeUeT/2dsb2JhbABZgwZRg0HBGQGBDxZ0giUBAQUjVhALGAICBRMOAgIPBRgdAROIWK0rpBsXgSqNJgeCdTaBFQSZWQGBPZFdgzk7 X-IronPort-AV: E=Sophos;i="4.98,865,1392159600"; d="scan'208";a="62532086" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 19 May 2014 09:56:17 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 6A8DCC009; Mon, 19 May 2014 09:56:16 +0200 (CEST) Date: Mon, 19 May 2014 09:56:16 +0200 From: Adrien Nader To: Andre Tampubolon Cc: caml-list@yquem.inria.fr Message-ID: <20140519075616.GA5308@notk.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Self contained Windows executable? Hi, On Mon, May 19, 2014, Andre Tampubolon wrote: > Hello folks, > > I just built ocaml on Windows 7 (mingw). > I notice that executables compiled with ocamlc (e.g ocamlc hello.ml -o > hello.exe) won't run on another machine. It says "Cannot exec ocamlrun". > > It seems that executables created with ocaml are not "native" executables, > because ocamlrun is still needed. On the other hand, executables compiled > with ocamlopt require Cygwin DLLs. > > Is there any workaround? Yes, ocamlc's output requires ocamlrun to execute since it's only bytecode and is portable (modulo C bindings). You need to use ocamlopt instead of ocamlc, it will generate native executables which are not portable. That ocamlopt's output requires cygwin1.dll means you've run the cygwin OCaml compiler; it depends on what you've installed and there are binaries of non-cygwin ocaml compilers available on http://caml.inria.fr (there might also be a cygwin package with one but it's probably a bit old) -- Adrien nader