Browse thread
[Caml-list] unbound value Parser.main?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Markus Mottl <markus@m...> |
| Subject: | Re: [Caml-list] unbound value Parser.main? |
On Thu, 30 Aug 2001, Michael Leary wrote: > doh! the OcamlMakefile... is picky about names. > > I've got it like this now: > > SOURCES = lexer.mll parser.mly fbot.ml > RESULT = fbot > LIBS=str Simple answer: you have to put the files in the Makefile into the right order. Since the generated module 'Lexer' depends on 'Parser' and module 'Fbot' on both you should write: SOURCES = parser.mly lexer.mll fbot.ml This should get rid of the problem. (In short: people have to topologically sort the files according to their dependencies and sort them totally wrt. their linking order). Because the order of the modules also plays a role during linking (and linking order matters, too, for side-effects!), there doesn't seem to be any alternative to specifying the order manually in the general case. Making files compile and link correctly by taking into account the dependies only would make things much more complicated without really solving the problem. It only gives the user the false sense that order doesn't matter. Regards, Markus Mottl -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr