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 JAA09334 for caml-redistribution; Tue, 22 Jul 1997 09:20:30 +0200 (MET DST) 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 SAA29054 for ; Mon, 21 Jul 1997 18:02:58 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.5/8.8.5) with ESMTP id SAA29436; Mon, 21 Jul 1997 18:02:45 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA29043; Mon, 21 Jul 1997 18:02:43 +0200 (MET DST) From: Xavier Leroy Message-Id: <199707211602.SAA29043@pauillac.inria.fr> Subject: Re: OCaml: problems compiling In-Reply-To: <199707180021.KAA00023@seedknee.socs.uts.EDU.AU> from "Paul A. Steckler" at "Jul 18, 97 10:21:51 am" To: steck@socs.uts.EDU.AU Date: Mon, 21 Jul 1997 18:02:43 +0200 (MET DST) Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > Frequently when compiling a file foo.ml files with ocamlopt > on a Sun Sparc, I get a message like: > > I/O error: foo.cmi: No such file or directory > > Note that it's complaining about the .cmi file for the > file currently being compiled, not some other module. > > How can I avoid the error to begin with? You should compile the foo.mli file before compiling the foo.ml file. That will produce the missing foo.cmi file. Alternatively, if you don't have an interface file foo.mli in the same directory as foo.ml, the compiler will create foo.cmi directly from foo.ml. I agree that a better error message is in order. Regards, - Xavier Leroy