Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml and Matlab
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] OCaml and Matlab
Excerpts from Till Crueger's message of Thu Jul 24 10:47:51 +0200 2008:
> Hi,
> 
> I am currently trying to get OCaml and Matlab to work together. I found
> OCamlMex on the Caml-Hump
> (http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=400).
> However when I try to compile it, I get an error:
> 
> ocamlc.opt -c -pp "camlp4r " -I /usr/lib64/ocaml/camlp4 mex.mli
> File "mex.mli", line 235, characters 15-17:
> Unbound type parameter 'a
> make[2]: *** [mex.cmi] Fehler 2
> make[2]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
> make[1]: *** [byte-code-library] Fehler 2
> make[1]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
> make: *** [all] Fehler 2
> 
> The line mentioned in the error looks like this:
> 
> type mxArray = 'a;
> (** The basic type for all the external data inside Matlab : a mxArray
>     can be a numeric array, a cell array, a struct array, or other kind of
>     data see mxClassID *)
> 
> So I am not at all surprised, that it won't work, because the 'a actually
> is unbound. Was this maybe possible with older versions of the compiler,
> or are there some workarounds, to get it working again?

That's a syntactic over the revised syntax of abstract types, now abstract
types are like in the original syntax:

  type mxArray;

-- 
Nicolas Pouillard aka Ertai