My problem is very simple. First, the following works as expected:
$ ls lib
batteries.ml
$ cd lib
$ ocamlc -c batteries.ml
$ ocamlmktop -o ../ocamltop batteries.cmo
$ ../ocamltop
Objective Caml version 3.11.1
# open Batteries;;
#
The module Batteries has been loaded in the interactive loop as
intended. Now, this *doesn't* work:
$ ls lib
batteries.ml
$ ocamlc -c lib/batteries.ml
$ ocamlmktop -o ocamltop -I lib batteries.cmo
$ ocamltop
Objective Caml version 3.11.1
# open Batteries;;
Error: Unbound module Batteries
#
??? This looks like a super-obvious bug, so I must have overlook
something. Any idea what? Is it possible to built a sensible toplevel
with libraries *not* in the current directory? How?
Thanks,
Loup.
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Are you sure you don't have an ocamltop executable in your $PATH that
gets executed?
--
Stéphane
The problem is not the library itself, but rather the associated .cmi files,
which the toplevel requires. You can either give the -I lib arguments to
ocamltop, or use the #directory "lib";; directive in the toplevel.
--
Mauricio Fernandez - http://eigenclass.org