Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
OCaml: problems compiling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-07-22 (07:20)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: OCaml: problems compiling
> Frequently when compiling a file 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 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, the compiler will create foo.cmi directly from

I agree that a better error message is in order.


- Xavier Leroy