From: Michael Vanier <mvanier@bbb.caltech.edu>
To: gerhard@bigfoot.de
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Newbie Ocaml problem
Date: Tue, 14 Aug 2001 22:10:20 -0700 (PDT) [thread overview]
Message-ID: <20010815051020.2359A5E0EC@sith.bbb.caltech.edu> (raw)
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)
> Date: Wed, 15 Aug 2001 04:02:12 +0200
> From: Gerhard =?iso-8859-1?Q?H=E4ring?= <haering_python@gmx.de>
>
> 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
prev parent reply other threads:[~2001-08-15 5:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-15 2:02 Gerhard Häring
2001-08-15 5:10 ` Michael Vanier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010815051020.2359A5E0EC@sith.bbb.caltech.edu \
--to=mvanier@bbb.caltech.edu \
--cc=caml-list@inria.fr \
--cc=gerhard@bigfoot.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox