mcExchange
mcExchange

Reputation: 6498

Compile standalone Matlab guide program for Windows using Ubuntu

I'm using Matlab R2016a. I'm following this video to compile my Matlab guide program as standalone application. However I can only see options to compile it for a Linux platform. Is it also possible to compile it for Windows using the Linux version of Matlab?

Upvotes: 1

Views: 120

Answers (1)

Tommaso Belluzzo
Tommaso Belluzzo

Reputation: 23685

Sadly, at present, the answer to your question is no. In Matlab you cannot achieve cross compilation of executables. The Matlab Compiler is strictly tied to the machine environment.

The basic rule is that in order to build an executable that can run under operating system X, it must be compiler under operating system X.

Therefore, you need to install the Matlab Compiler on a Windows machine to create an executable that can run under Windows. On the top of that, Windows represents a special case in which you have to consider the difference between 32 and 64 bit versions. For more infos, read these threads:

  1. https://it.mathworks.com/matlabcentral/answers/4649-deploy-for-windows-32-bit-from-a-64-bit-computer
  2. https://it.mathworks.com/matlabcentral/answers/217297-32-bit-exe-compilation-using-matlab-64-installed
  3. https://it.mathworks.com/matlabcentral/answers/60904-compile-executable-for-64-bit-system

Upvotes: 0

Related Questions