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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 02A8E7ED33 for ; Tue, 19 Jun 2012 16:56:13 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.75,798,1330902000"; d="scan'208";a="148144476" Received: from alcazar.saclay.inria.fr (HELO alcazar) ([193.55.250.203]) by mail4-relais-sop.national.inria.fr with ESMTP; 19 Jun 2012 16:56:13 +0200 Date: Tue, 19 Jun 2012 16:55:13 +0200 From: Maxence Guesdon To: Philippe Veber Cc: caml users Message-ID: <20120619165513.0c9608f4@alcazar> In-Reply-To: References: <20120619164243.5c57a432@alcazar> Organization: INRIA X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Strange compilation error. On Tue, 19 Jun 2012 16:47:16 +0200 Philippe Veber wrote: > 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? Ah yes, sorry. Then I have no idea. Maxence