From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F22E1BCAB for ; Wed, 18 May 2005 12:04:54 +0200 (CEST) Received: from web50305.mail.yahoo.com (web50305.mail.yahoo.com [206.190.38.59]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id j4IA4shp007760 for ; Wed, 18 May 2005 12:04:54 +0200 Received: (qmail 1529 invoked by uid 60001); 18 May 2005 10:04:53 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=ZnLco1MbKgOKOYVS0YKDY5VXj5VYGq2I8RiUBtDRtco40Squn2EIbMBtAZJJ2IlSZ9RK31PsCAL7zu+p4UA9iyyExHKIPCtpbLTr5PizAIcCAlvN0s1J+OfH1TO0zmu7Cv1CKETRBuRAtE6NSPrLCUpC5KK4umbXeg8qs+MtjEg= ; Message-ID: <20050518100453.1527.qmail@web50305.mail.yahoo.com> Received: from [193.108.159.193] by web50305.mail.yahoo.com via HTTP; Wed, 18 May 2005 03:04:53 PDT Date: Wed, 18 May 2005 03:04:53 -0700 (PDT) From: Lars Schouw Subject: using gsl library.... To: caml-list@yquem.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 428B1346.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gsl:01 gsl:01 printf:01 printf:01 gaussian:01 gaussian:01 ocaml:01 ocamlopt:01 -cclib:01 lib:01 bigarray:01 cmxa:01 cmxa:01 ocaml:01 beginners:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: This is newbii !!! We are trying to use the ocmlgsl library. we are trying to call the ugaussian_P function belonging to Gsl_cdf. This works: open Gsl_fun;; let _ = Gsl_error.init () ; Gsl_rng.env_setup () let rng = Gsl_rng.make (Gsl_rng.default ()) let sigma = 3. let _ = Printf.printf "# gaussian with sigma=%g\n" sigma ; for i=1 to 10 do let x = Gsl_randist.gaussian rng 3. in Printf.printf "%+.7f\n" x done This does not compile: let _ = Gsl_error.init () ; Gsl_rng.env_setup () let rng = Gsl_rng.make (Gsl_rng.default ()) let sigma = 3. let _ = Printf.printf "# gaussian with sigma=%g\n" sigma ; for i=1 to 10 do let x = Gsl_cdf.ugaussian_P 3. in Printf.printf "%+.7f\n" x done C:\ocaml\gsl\ocamlgsl-0.4.0\examples>ocamlopt -cclib gsl.lib -I .. bigarray.cmxa ..\gsl.cmxa bs.ml File "bs.ml", line 23, characters 12-31: Unbound value Gsl_cdf.ugaussian_P Do you have any ideas what I do wrong? I am using my own Windows 1.6 build of GSL that I build yesterday. Regards Lars Schouw BTW. I asked this on the ocaml_beginners mailing list and they told me this is to Windows specific. BTW2: From the ocaml_beginner mailing list It works on Debian if you do /usr/lib# ln -s libgsl.so.0 libgsl.so /usr/lib# ln -s libgslcblas.so.0 libgslcblas.so /usr/lib# ldconfig > Then I compiled your second example with: > > $ ocamlopt -cclib -lgsl -I +gsl gsl.cmxa test.ml -o test and ran it with: > > > > $ ./test > > # gaussian with sigma=3 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 > > +0.9986501 BTW3: If I try this I get an unbound module error C:\ocaml\gsl\ocamlgsl-0.4.0\examples>ocamlopt -cclib -lgsl -I +gsl > gsl.cmxa bs.ml -i bs > File "bs.ml", line 2, characters 0-12: > Unbound module Gsl_fun __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail