From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA25533 for caml-red; Tue, 23 Jan 2001 22:59:29 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA14038 for ; Tue, 23 Jan 2001 10:45:07 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f0N9j7D25024; Tue, 23 Jan 2001 10:45:07 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA24574; Tue, 23 Jan 2001 10:45:06 +0100 (MET) Date: Tue, 23 Jan 2001 10:45:06 +0100 From: Xavier Leroy To: jeanmarc.eber@lexifi.com Cc: caml-list@inria.fr, david.vincent@lexifi.com Subject: Re: -custom under win32 Message-ID: <20010123104506.B5637@pauillac.inria.fr> References: <980184766.3a6c6ebe3620e@imp.pro.proxad.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <980184766.3a6c6ebe3620e@imp.pro.proxad.net>; from jeanmarc.eber@lexifi.com on Mon, Jan 22, 2001 at 06:32:46PM +0100 Sender: weis@pauillac.inria.fr > Hi OCamler! > > I want to generate a "closed bytecode" executable under win32 (that > contains the bytecode interpreter so that it can be used on a > machine without OCaml installed). I'm just using the "standard" > Ocaml run-time (I haven't written any C-code to incorporate in the > run-time). > > 1. Do I understand well that I need the Microsoft Linker (cl.exe), > but ONLY the linker, not the C compiler or assembler ? You don't need the assembler, however you need the C libraries in addition to the linker, so it looks like the full VC++ is needed to get "ocamlc -custom" to work. BUT: if there is no C code in your program, you can build a closed bytecode executable just by concatenating the standard bytecode interpreter with your bytecode executable: copy /b \ocaml\bin\ocamlrun.exe+mybytecode.exe standalone.exe or if you prefer the Unix-like way: cat /ocaml/bin/ocamlrun.exe mybytecode.exe > standalone.exe Easy, wasn't it. > 2. If yes, does anybody know if this linker can be obtained/purchased/... > without buying VC++ ? No idea. > 3. Can my problem be solved with Cygwin now, in a future version ? The next release of OCaml will contain a Cygwin port, so you'll be able to do "ocamlc -custom" without buying VC++. I think you'll need to distribute the Cygwin DLL along with the generated executable, though. - Xavier Leroy