Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
3.10.0 win xp mingw library path problems
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-24 (11:08)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] 3.10.0 win xp mingw library path problems
> Hi,
> after installing ocaml-3.10.0-win-mgw.exe on WinXP
> the OCamlWinPlus v1.9RC4 says
> Objective Caml version 3.10.0
> # Big_int.big_int_of_int 32;;
> Reference to undefined global `Big_int'

You haven't loaded nums.cma - execute #load "nums.cma";;

> # Big_Int.big_int_of_int 32;;
> Wrong file naming: C:\Program2\ocaml\lib\big_Int.cmi
> contains the compiled interface for Big_int

OCaml requires the case of a module name to be the same as the interface
filename (.cmi) - even under windows - except that the first character may
be either lowercase or uppercase (presumably to allow for the difference in
general naming conventions under Windows/UNIX though I don't know the exact
history). When you tried Big_int.big_int_of_int before, OCaml knew what you
meant in terms of typing because big_int.cmi is in your OCaml lib directory
(it just couldn't actually run it because you hadn't loaded nums.cma which
contains the actual code in big_int.cmo). Saying requires
big_Int.cmi which doesn't exist and so causes the different error.

> Other libraries seem to work in OCamlWinPlus. However,

I've never OCamlWinPlus but...

> >        Objective Caml version 3.08.1

I thought you were working with OCaml 3.10.0? Env.Error(_) is part of the
typing part of the compiler - I'm not sure, but I don't think that this
exception should make it to the toplevel! Is there something strange in your
.ocamlinit file or have you missed off part of the transcript? Or is your
OCAMLLIB pointing to the 3.10.0 lib rather than a 3.08.1 lib?