From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id HAA16228; Wed, 15 Aug 2001 07:10:25 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA16070 for ; Wed, 15 Aug 2001 07:10:24 +0200 (MET DST) Received: from corruscant.bbb.caltech.edu (bbb.caltech.edu [131.215.25.161]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7F5ANf20037 for ; Wed, 15 Aug 2001 07:10:23 +0200 (MET DST) Received: from sith.bbb.caltech.edu (sith.bbb.caltech.edu [131.215.137.33]) by corruscant.bbb.caltech.edu (Postfix) with ESMTP id 7A19E4EE50; Tue, 14 Aug 2001 21:44:38 -0700 (PDT) Received: by sith.bbb.caltech.edu (Postfix, from userid 590) id 2359A5E0EC; Tue, 14 Aug 2001 22:10:20 -0700 (PDT) From: Michael Vanier To: gerhard@bigfoot.de Cc: caml-list@inria.fr In-reply-to: <20010815040212.A4880@lilith.hqd-internal> (message from Gerhard =?iso-8859-1?Q?H=E4ring?= on Wed, 15 Aug 2001 04:02:12 +0200) Subject: Re: [Caml-list] Newbie Ocaml problem References: <20010815040212.A4880@lilith.hqd-internal> Message-Id: <20010815051020.2359A5E0EC@sith.bbb.caltech.edu> Date: Tue, 14 Aug 2001 22:10:20 -0700 (PDT) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Date: Wed, 15 Aug 2001 04:02:12 +0200 > From: Gerhard =?iso-8859-1?Q?H=E4ring?= > > Hello, > > I'd like to finally learn some functional programming. I thought Ocaml might be > a good choice because it also has imperative features, so transition to a > functional language like Ocaml is probably smoother than, say Haskell. > > I started with the Ocaml tutorial, but I learn best with real problems (I'd > like to translate a few of my Python scripts to Ocaml), so I need things from > the standard library. In particular, I need the Unix module. And here I've hit > a problem: > > gerhard@lilith:~ > ocaml > Objective Caml version 3.02 > > # Sys.os_type;; > - : string = "Unix" > # Unix.getpid;; > Reference to undefined global `Unix' > # > > I can use the Sys module, but whenever I try to use stuff from the Unix module, > I get the error message above. It must be something obvious I am missing. But > what? > > Thanks, > > Gerhard >>From the online docs: Programs that use the unix library must be linked as follows: ocamlc other options unix.cma other files ocamlopt other options unix.cmxa other files For interactive use of the unix library, do: ocamlmktop -o mytop unix.cma ./mytop Mike ------------------- 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