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
[Caml-list] ocamldep problem with .cmo vs .cmx
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-07 (10:41)
From: Alain Frisch <frisch@c...>
Subject: Re: [Caml-list] ocamldep problem with .cmo vs .cmx
On Wed, 7 Aug 2002, Henri Dubois-Ferriere wrote:

> So the question is:
> In the example above, why doesn't ocamldep output
> main.cmo: mylib.cmo
> instead of
> main.cmo: mylib.cmi

Because you don't need to rebuild main.cmo when you change the
implementation of Mylib (the link between the two modules is
resolved at ... link time). Native-code compilation performs
some cross-modules optimizations (not sure, but probably constant
propagation and function inlining), which need the implementation of
Mylib when you compile Hence the difference.

Anyway, you have to specify even on ocamlopt command line the full
list of .cmx files you want to put in the result. So it's not a big
deal to have the list of .cmo/.cmx files in the dependencies.

-- Alain

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: