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 (16:32)
From: Joshua D. Guttman <guttman@l...>
Subject: Re: OCaml: problems compiling
>  > 	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

Is there some convenient way to set up a makefile so that it will
ensure that foo.cmi is generated (or re-generated) before foo.cmo or

Not being a magician of `make', I didn't see an easy way to express
the conditional on there existing a foo.mli file.  Of course, in the
ideal case one would actually see whether it was possible to make
foo.mli, e.g. from foo.mly.