From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id E5AA77ED33 for ; Tue, 19 Jun 2012 16:47:39 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcBAAqQ4E/RVdy2mGdsb2JhbABFrGoBiGEIIgEBAQEBCAkNBxQnghgBAQEDARICExkBGx0BAwELBgUEBw0uIQEBEQEFARwGEyKHWgEDBgWaQgkDjCGCcIVAChknDVeIcQEFDIpAY4YZA5UlgRKJbYMhPoQB X-IronPort-AV: E=Sophos;i="4.75,798,1330902000"; d="scan'208";a="163572905" Received: from mail-vc0-f182.google.com ([209.85.220.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Jun 2012 16:47:39 +0200 Received: by vcbfy7 with SMTP id fy7so5665249vcb.27 for ; Tue, 19 Jun 2012 07:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=YPs43axMlpX+TzN/UiC1+G1Ou9j6XBfWc/6VyDqHwBE=; b=aQX4zU75Xpz9g0+bpUu4fGM+eU3JDmt0qXjSp2VRsa2JLtXgBoRee7xd2hwu+9jzu1 UcohRuFACxL9voFQKY6p9Y8clIUNSx0YeHtRSFeakmhnUFl0/sNIWfUwdoZRI/JG2qxI SkIufyR0a/3XTBvrnS1aw4VEyLzH2Qb9E3ZKHom+AIDAFFmwFCE4KMHufR8CggnJAteV UJ2OHQ+NTTD2Cabp3rHAHD+VdaGxu2Yva+Xg/aEaSyz0R3eXr5TrIge7ZszR70ZbJ5lD neSyiFQ24qHm7Rk4f/3DCvr7u6Gz+wOIkrDaNmpdPyHdYbooA/vlZcTSGro98r5RWU4O vCjQ== Received: by 10.52.96.135 with SMTP id ds7mr7969380vdb.50.1340117258136; Tue, 19 Jun 2012 07:47:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.159.104 with HTTP; Tue, 19 Jun 2012 07:47:16 -0700 (PDT) In-Reply-To: <20120619164243.5c57a432@alcazar> References: <20120619164243.5c57a432@alcazar> From: Philippe Veber Date: Tue, 19 Jun 2012 16:47:16 +0200 Message-ID: To: Maxence Guesdon Cc: caml users Content-Type: multipart/alternative; boundary=20cf307f3b8e20ee1504c2d45dc0 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] Strange compilation error. --20cf307f3b8e20ee1504c2d45dc0 Content-Type: text/plain; charset=ISO-8859-1 2012/6/19 Maxence Guesdon > On Tue, 19 Jun 2012 16:30:27 +0200 > Philippe Veber wrote: > > > Dear camlers, > > Hello, > > > I'm desperately stuck with the following issue: I fail to compile a > program > > using a module, but have no problem using the module in question in the > > toplevel. > > > > Here is how I use it in the toplevel > > > > $ ocaml > > Objective Caml version 3.12.1 > > > > # #directory > > "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R";; > > # #load "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R/ > > R_math.cma";; > > # Rmath.pow;; > > - : float -> float -> float = > > > > > > Now with the following program: > > $ cat test.ml > > let x = Rmath.pow 2. > > > > I try to compile with the options corresponding to the toplevel > directives: > > > > $ ocamlc -o rmath -I > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R/R_math.cma > > test.ml > > File "test.ml", line 1, characters 8-17: > > Error: Unbound module Rmath > > Do you have a R_math.cmi file in your ...site-lib/R directory ? > Hi Maxence, I have a rmath.cmi, and Rmath is one of the modules contained in R_math.cma That should be ok, right? ph. --20cf307f3b8e20ee1504c2d45dc0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/6/19 Maxence Guesdon <Maxen= ce.Guesdon@inria.fr>
On Tue, 19 Jun 2012 16:30:27 +0200
Philippe Veber <philippe.veb= er@gmail.com> wrote:

> Dear camlers,

Hello,

> I'm desperately stuck with the following issue: I fail to compile = a program
> using a module, but have no problem using the module in question in th= e
> toplevel.
>
> Here is how I use it in the toplevel
>
> $ ocaml
> =A0 =A0 =A0 =A0 Objective Caml version 3.12.1
>
> # #directory
> "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R&quo= t;;;
> # #load "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-l= ib/R/
> R_math.cma";;
> # Rmath.pow;;
> - : float -> float -> float =3D <fun>
>
>
> Now with the following program:
> $ cat test.ml
> let x =3D Rmath.pow 2.
>
> I try to compile with the options corresponding to the toplevel direct= ives:
>
> $ ocamlc -o rmath -I
> /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R
> /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R/R_math.cm= a
> test.ml
> File "test.ml&qu= ot;, line 1, characters 8-17:
> Error: Unbound module Rmath

Do you have a R_math.cmi file in your ...site-lib/R directory ?

Hi Maxence,

I have a rmath.cmi, and Rmath is one= of the modules contained in R_math.cma
That should be ok, right?

ph.
--20cf307f3b8e20ee1504c2d45dc0--