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 A62087ED33 for ; Tue, 19 Jun 2012 16:44:02 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.75,798,1330902000"; d="scan'208";a="148142666" 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:43:43 +0200 Date: Tue, 19 Jun 2012 16:42:43 +0200 From: Maxence Guesdon To: Philippe Veber Cc: caml users Message-ID: <20120619164243.5c57a432@alcazar> In-Reply-To: References: 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: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 ? Regards, Maxence