Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamldep
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <m.jambon@i...>
Subject: Re: [Caml-list] ocamldep
On Mon, 26 Feb 2001, Laure Danthony wrote:

> EV : why do ocamldep not find the dependencies in that case :
> 	file one.ml : #use "two.ml";;
> 	ocamldep one.ml says :
> Syntax error line1, char 0,1

If you want to split your code into several source files, modules, that
is:

-- file two.ml --
let f = ...
-----------------


-- file one.ml --
let _ =
  ...
  Two.f ...
  ...
-----------------

or :

-- file one.ml --
open Two

let _ =
  ...
  f ...
  ...
-----------------


two.ml must be compiled before one.ml, and that's what ocamldep has been
designed for.

For further details on modules, have a look at the reference manual:
http://caml.inria.fr/ocaml/htmlman/index.html


-- Martin

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr