help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matlab and Octave MEX files compatibility


From: David Bateman
Subject: Re: Matlab and Octave MEX files compatibility
Date: Fri, 07 Jan 2011 22:51:24 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Ben Abbott wrote:
> On Jan 7, 2011, at 12:50 PM, Phonon wrote:
>
>   
>> Hello, everyone!
>>
>> I've used both Matlab and Octave for ages, but in the past few days I've
>> been trying to make their MEX files (and such) talk to each other. On
>> practically every forum I find people saying that they are compatible;
>> however, here's my problem:
>>
>> Matlab compiles into MEX files having one of the following extensions:
>> .mexw32, .mexw64, .dll
>> Octave compiles and works with the following extensions: .oct, .mex
>>
>> Is there any way to make Matlab make a proper .mex file that Octave would
>> read, or, alternatively, is there any way to make Octave run .mex32 files?
>> There probably is a simple solution, but I've been at this forever and I
>> just can't seem to figure it out. Simply renaming a .mexw32 file into .mex
>> does not work. In fact, both Matlab and Octave give errors when trying to
>> open it. Any suggestions?
>>
>> Thanks in advance!
>>
>> Cheers
>> -Phonon
>>     
>
> Octave's mex is intended to be source compatible with Matlab. It is not 
> binary compatible.
>
> Ben
>   

Theoretically its possible to make it binary compatible, but no one has
bothered. A mex-file is just another shared object with a known ABI, and
swapping mex files from Octave to Matlab could be like using LD_PRELOAD
to force a different version of the blas to be used with Octave. I'm not
sure of the details of getting octave and matlab mex files abi
compatible and I don't propose to make any effort to add such a feature,
as it give credence to the idea that mex-files from matlab in binary
form could be used with octave despite their different licensing and it
could be construed as promoting theft of mathworks code.

D.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]