1

I want to know if it's possible to compile code on OSX Lion with Matlab's Compiler Runtime(MCR), and create a command line tool that runs on Linux. I realise that this is not possible on the Windows->Linux paradigm, but is it also the case between OSX and Linux?

If it is possible, what are the necessary steps, and will I need to install the Linux MCR on the Linux machine to run the application?

Thanks alot.

Christos

3
  • My apologies if you knew this already, but just in case you didn't, it's worth mentioning that MATLAB licenses cover you for all platforms. If you only have the OSX version, then as long as you're in maintenance you can download the Linux (or Windows) version, which you can then use to compile/produce a Linux version of your application. Aug 14, 2012 at 10:27
  • Are you sure about this Sam? I have a student licence for my OSX version, but I didn't think it would allow me to install a Linux VM on my macbook and use the same licence to run Matlab on that VM. Can anyone verify this?
    – cmdel
    Aug 14, 2012 at 14:00
  • It is the case for commercial and academic licenses. As long as you are in maintenance, you can log in to your MathWorks account and download any products you are licensed for on any supported platforms. You can install a Linux VM on your MacBook and use the same license to run MATLAB on the VM. (You may not run more than two installations of an individual license simultaneously). I'm not sure about student licenses - check with MathWorks - but I believe the cross-platform nature of the license is the same. Aug 14, 2012 at 20:49

2 Answers 2

1

Sorry it's not possible. To build Linux binaries you will need a Linux installation of Matlab and Matlab Compiler and build the binaries there.

1
  • From Mathworks Support: "To be able to create a standalone application out of your MATLAB code you would need MATLAB Compiler which unfortunately does not exist in the student version. Also to be able to create a standalone which can run on a Linux system you would actually need to create the standalone using MATLAB + MATLAB Compiler for Linux on a Linux machine."
    – cmdel
    Aug 15, 2012 at 8:36
0

First suggestion is: use the Java Builder - that way it will work across the operating systems (also windows).

3
  • This seems very interesting. I was afraid that that as robince said when compiling to native binary, then you'd need a linux OS to run on linux, but JAVA has the potential to make it platform agnostic. I'll try this out and if it works, I'll mark this answer as correct for future reference. Thanks bdecaf.
    – cmdel
    Aug 14, 2012 at 10:12
  • As @bdecaf suggests, it is possible to create cross-platform components using Java Builder. However, your end-users will still need to install a platform-specific MCR to run the application. Aug 14, 2012 at 10:24
  • Yes this is what I've understood as well. But at least they won't need a licence to install the MCR on their machine.
    – cmdel
    Aug 14, 2012 at 14:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.