From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id BDDF4BB94 for ; Wed, 29 Dec 2004 02:50:46 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBT1okmD024438 for ; Wed, 29 Dec 2004 02:50:46 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA28663 for ; Wed, 29 Dec 2004 02:50:46 +0100 (MET) Received: from sys25.mail.msu.edu (sys25.mail.msu.edu [35.9.75.125]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBT1oihZ020912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 29 Dec 2004 02:50:45 +0100 Received: from c-24-56-225-152.chrlmi.cablespeed.com ([24.56.225.152] helo=gft) by sys25.mail.msu.edu with esmtpsa (Exim 4.43 #1) (TLSv1:RC4-MD5:128) id 1CjSz5-0000en-Ax for caml-list@inria.fr; Tue, 28 Dec 2004 20:50:43 -0500 Message-ID: <000301c4ed48$d4cd5070$6600a8c0@gft> From: "Jeff Shaw" To: Subject: I'm having trouble compiling independent executables Date: Tue, 28 Dec 2004 20:50:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus: None found by Clam AV X-Miltered: at concorde with ID 41D20D76.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41D20D74.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 wrote:01 ocamlc:01 stand-alone:01 ocamlc:01 -custom:01 ocamlopt:01 mingw:01 -custom:01 runtime:01 dll's:01 lib':01 runtime:01 ocamlopt:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: Hi there, this is my first post. I'm a college student who learned OCaml last semester and likes it a lot. I'm a lingusitics student, so my programming knowledge is limited, but I enjoyed learning OCaml a LOT more than C++. For fun this winter break I wrote an RPN calculator, and I would like to compile it to run independently of any OCaml installation. I have both Visual Studio .NET 2003 and cygwin installed. I've googled for the errors I'm getting and I can't seem to find anything helpful. First of all, "ocamlc rpn.ml" always works. But it won't run on a machine that doesn't have ocaml installed. The two ways I've read of to make stand-alone executables are "ocamlc -custom" and "ocamlopt." I have gotten neither to work in all three ways of using OCaml in windows: MSVC, MinGW, and cygwin. With the MSVC compiled version of OCaml: ocamlc rpn.ml works ocamlc -custom rpn.ml gives 'cl' is not recognized as an internal or external command, operable program or batch file. Error while building custom runtime system This is partially rectified by putting cl.exe on my PATH, but then I get the following dialog box: "cl.exe - Unable to locate component This application has failed to start because mspdb71.dll was not found. Re-installing the application may fix this problem." So then I put this DLL's directory on my PATH. Then I get: "camlprima15001.c LINK : fatal error LNK1181: cannot open input file 'advapi32.lib' Error while building custom runtime system" Searching for this file fails, and googling for it fails, so I don't know what to think. I even have the ocaml source code on my hard drive, so I know it's not in there. ocamlopt rpn.ml gives LINK : fatal error LNK1181: cannot open input file 'advapi32.lib' Error during linking I put this file on my PATH, but then I get the same error. I don't know how to fix it. On to cygwin... I've tried recompiling and installing ocaml from source, but that doesn't fix the problems. ocamlc -custom rpn.ml "/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld cannot find -lcamlrun collect2: ld returned 1 exit status Error while building custom runtime system" ocamlopt rpn.ml "cannot find file libasmrun.a" I put the file on my PATH ( PATH=";/usr/local/lib/ocaml ) but that doesn't fix it. I add the file to the command line, but that doesn't fix it either. MinGW version of ocaml... ocamlc -custom rpn.ml does not have access to gcc, which is in cygwin only, so it doesn't work. ocamlopt rpn.ml "'as' is not recognized as an internal or external command, operable program or batch file. Assembler error, input left in file C:\DOCUME~1\jeff\LOCALS~1\Temp\camlasm4af23d .s" BTW my source does not need any special modules; the program runs using only what's available in Pervasives. Any help would be appreciated! Jeff