1

This may be due to my inexpertise in the area, but I'm looking for a way to use a function already compiled in a .mexw64 in a language or program different than MATLAB.

So far, I've found plenty of ways to create a code in other languages to compile into a .mexw64 for a further use in MATLAB, but here what I want to do is to use a fully compiled .mexw64 function (given by someone else) in, lets say, scilab (or any other language for the matter).

I have no interest in looking at the code (although it is definitely a plus), I only want to use it as a black box where I input what it needs and I get the normal output of it. Any solution that allows me to do this in another program or language other than MATLAB is welcomed. I don't know if this is possible or if it is a lost cause.

8
  • 1
    Mex functions are dll files. I never tried it, but there are multiple tools to get informations about an "unknown" dll file, maybe you get something useful out of it.
    – Daniel
    Feb 5, 2016 at 16:13
  • Never seen it done before, but maybe Octave provides something like that [MEX-files in octave]( gnu.org/software/octave/doc/interpreter/Mex_002dFiles.html) . Would be interested if you succeed
    – spoorcc
    Feb 5, 2016 at 16:31
  • 4
    To use mex files you need matlab runtime libraries. You are much better off bypassing the mex layer, extract the underlying C functions of the business logic. Feb 5, 2016 at 16:33
  • 1
    Octave is only source code compatible, not binary compatible. That would at least be a possible work around, you may get in touch with the author and ask him to mex the file again using octave.
    – Daniel
    Feb 5, 2016 at 16:52
  • 1
    @Daniel By matlab runtime libraries I mean libraries that supports the mex api calls in the mex layer. Feb 5, 2016 at 17:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.