Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild and automatic dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] ocamlbuild and automatic dependencies
On 3/14/07, Joel Reymont <joelr1@gmail.com> wrote:
> Nicolas,
>
> On Mar 14, 2007, at 12:24 PM, Nicolas Pouillard wrote:
>
> > ocamlbuild runs ocamldep -module on your file so you can experiment
> > by yourself.
>
> generator.ml:
>
> open Ninja
> module E = Easy
>
> ocamldep -modules generator.ml
> generator.ml: Easy List Ninja String

That's correct

> ocamlbuild test.byte --
> + ocamlfind ocamlc -package ounit -linkpkg easy_code.cmo
> generator.cmo parser_util.cmo symtab.cmo easy_parser.cmo
> easy_lexer.cmo parser_test.cmo generator_test.cmo test.cmo -o test.byte
> Error while linking generator.cmo: Reference to undefined global `Easy'

That's strange easy.cmo is missing.

Can you try "ocamlbuild easy.byte" ?

> The warnings in the _log file are about OUnit which is an external
> library. There are no other warnings. Everything builds fine if I
> remove "module E = Easy" and replace all references to E.xxx with
> Easy.xxx.

That's strange since the only interaction is via ocamldep where the
output is located in _build/xxx.ml.depends


-- 
Nicolas Pouillard