caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Veber <philippe.veber@gmail.com>
To: Maxence Guesdon <Maxence.Guesdon@inria.fr>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Strange compilation error.
Date: Tue, 19 Jun 2012 18:28:23 +0200	[thread overview]
Message-ID: <CAOOOohRCF_rKY8kx2P_c-0ZsPf_3CmMmnYyX9DJeLSs10B0e1A@mail.gmail.com> (raw)
In-Reply-To: <20120619165513.0c9608f4@alcazar>

[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]

2012/6/19 Maxence Guesdon <Maxence.Guesdon@inria.fr>

> On Tue, 19 Jun 2012 16:47:16 +0200
> Philippe Veber <philippe.veber@gmail.com> wrote:
>
> > 2012/6/19 Maxence Guesdon <Maxence.Guesdon@inria.fr>
> >
> > > On Tue, 19 Jun 2012 16:30:27 +0200
> > > Philippe Veber <philippe.veber@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
> 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 = <fun>
> > > >
> > > >
> > > > 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?
>
> Ah yes, sorry. Then I have no idea.
>
> You couldn't have guessed, that one was really really really silly: before
calling my test program test.ml, I called it rmath.ml. After I changed it,
but there still was a rmath.cmi in my current directory, which would hide
the one in site-lib/R.

Really sorry for the noise, and thanks Maxence for giving a hand!
ph.

[-- Attachment #2: Type: text/html, Size: 3260 bytes --]

  reply	other threads:[~2012-06-19 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19 14:30 Philippe Veber
2012-06-19 14:42 ` Maxence Guesdon
2012-06-19 14:47   ` Philippe Veber
2012-06-19 14:55     ` Maxence Guesdon
2012-06-19 16:28       ` Philippe Veber [this message]
2012-06-19 15:10 Maxence Guesdon

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=CAOOOohRCF_rKY8kx2P_c-0ZsPf_3CmMmnYyX9DJeLSs10B0e1A@mail.gmail.com \
    --to=philippe.veber@gmail.com \
    --cc=Maxence.Guesdon@inria.fr \
    --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;
as well as URLs for NNTP newsgroup(s).