[Pkg-octave-devel] Dynare: git, matlab, testsuite
Sébastien Villemot
sebastien.villemot at ens.fr
Tue May 26 08:14:36 UTC 2009
Rafael Laboissiere <rafael at debian.org> a écrit :
> * John W. Eaton <jwe at octave.org> [2009-05-25 15:37]:
>
>> On 25-May-2009, Sébastien Villemot wrote:
>>
>> | For the MEX functions, we have no way of linking against the Matlab
>> | library from pure Debian.
>>
>> Do you actually need to? I've built MEX files on a system without
>> Octave or Matlab, and then run the resulting MEX file with both Octave
>> and Matlab. I think all you really need is a mex.h header file that
>> provides the declarations of the functions you will need. The mxArray
>> object can be treated as a purely opaque object because all actions
>> that you can perform on an mxArray object are done via functions that
>> take pointers to mxArray objects, so you can declare mxArray as void.
>
> Yes, that was my understanding too. However, as you wrote:
Well, I have to look into that again. What you suggest is to create a
dynamic object without giving any external library to the linker; and
at runtime, Octave or Matlab would dynamically link with the correct
library. I'll try this.
However, I have at least one example which must create a problem with
this technique: on 64 bits platforms, the LAPACK shipped with Matlab
has changed its function prototypes in Matlab 2009a. Integers in
LAPACK function prototypes are 32 bits in Matlab <= 2008b, and are 64
bits in Matlab >= 2009a. So it is probably not possible to create a
MEX file working for all Matlab version on 64 bits platforms, as long
as this MEX file uses LAPACK functions.
--
Sébastien Villemot
More information about the Pkg-octave-devel
mailing list