Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlmktop mystery
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Weimer <fw@d...>
Subject: ocamlmktop mystery
[Repost from comp.lang.functional]

I can't use ocamlmktop to build a toplevel using objects in a
different directory:

$ mkdir lib
$ echo let add a b = a + b > lib/foo.ml
$ ocamlc -c lib/foo.ml
$ ocamlmktop -I lib lib/foo.cmo
$ ./a.out
        Objective Caml version 3.08.3

# Foo.add;;
Unbound value Foo.add
# 

However, changing to the directory first works as expected:

$ cd lib
$ ocamlmktop foo.cmo
$ /a.out
        Objective Caml version 3.08.3

# Foo.add;;
- : int -> int -> int = <fun>
# 

What am I doing wrong?