From: "Mr. Herr" <misterherr@freenet.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ocamlfind? how to compile
Date: Fri, 12 Apr 2013 19:09:25 +0200 [thread overview]
Message-ID: <51683FC5.6060504@freenet.de> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9CC5ACBC3@Remus.metastack.local>
Am 12.04.2013 18:19, schrieb David Allsopp:
> Mr. Herr wrote:
>> I did not understand how the helpers for compilation are supposed to work.
>>
>> For example I have a script that executes external programs, and needs the
>> Unix module.
>>
>> For script execution I have in the top of my script: #load "unix.cma";;
> Good "trick" for findlib is to add:
> #use "topfind"
> to ~/.ocamlinit (create it, if necessary) and then in future toploops you just say
> #require "unix";;
> instead. Useful when you start using packages which depend on other packages...
>
First try:
I added topfind to .ocamlinit, and in the interactive toplevel I see the startup
info, and I can enter [ #require "unix";; ],
but when I put [ #require "unix";; ] into my .ml file I get a syntax error on it:
str@suse122-intel:~/Ocaml/ml> ocaml unix2_exec.ml ls -l b\*
Unknown directive `require'.
Same error on compile with ocamlc. Sorry, I don't see how this is supposed to work.
/Str.
next prev parent reply other threads:[~2013-04-12 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 21:59 [Caml-list] [ANN] Merlin 1.0 released Frédéric Bour
2013-04-12 1:14 ` Francois Berenger
2013-04-13 16:57 ` Frédéric Bour
2013-04-12 16:01 ` [Caml-list] ocamlfind? how to compile Mr. Herr
2013-04-12 16:19 ` David Allsopp
2013-04-12 17:09 ` Mr. Herr [this message]
2013-04-12 18:17 ` David Allsopp
2013-04-12 18:51 ` Mr. Herr
2013-04-12 19:35 ` Mr. Herr
2013-04-14 9:31 ` AW: " Gerd Stolpmann
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=51683FC5.6060504@freenet.de \
--to=misterherr@freenet.de \
--cc=caml-list@inria.fr \
/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