gui.mli:
class type control =
object
val id: int
end
gui.ml:
class control =
let new_id = next_id () in
object (self)
val id = new_id
end
tree@forest:~/work/ocaml$ make
make[1]: Wejście do katalogu `/home/tree/work/ocaml'
ocamldep test.ml > ._d/test.d
ocamldep gui.ml > ._d/gui.d
make[1]: Opuszczenie katalogu `/home/tree/work/ocaml'
make[1]: Wejście do katalogu `/home/tree/work/ocaml'
ocamlc -c -I +sdl gui.mli
ocamlc -c -I +sdl gui.ml
ocamlc -c -I +sdl test.ml
File "test.ml", line 3, characters 12-27:
Unbound class Gui.control
make[1]: *** [test.cmi] Błąd 2
make[1]: Opuszczenie katalogu `/home/tree/work/ocaml'
make: *** [byte-code] Błąd 2