How to generate a Linux executable from a Windows machine using MCC ? (R2016a)
Show older comments
I have Matlab R2016a and R2020a in my Local Windows 11 Machine. I have to run a job in a Linux Super Computer architecture which have the appropiate Runtimes. Therefore, when I compile my code in My Local Windows Machine, I have to generate a Linux Executable (.sh). How can I do this? Virtual Box? Linux LTS inside Windows 11? Writing my Own .sh including the .exe file produce by My Local Machine?
Thank you in advance,
4 Comments
Walter Roberson
on 2 Apr 2023
Note:
In Linux any file extension can be used for binary executables. Linux does not identify executables by file extension: it uses "magic numbers" stored in the file.
That said, the convention is that .sh is a file extension used by shell scripts (text), not by binary executables. The convention is that binary executables typically do not have any file extension.
For example, giving the command cc at the command line in Linux does not result in the command Interpreter looking for cc.exe on the search path: instead it just searches for a file named cc with no extension.
It could be that your system is expecting a sh file but that file would be a text file to set up the environment and then run the binary executable.
Bello Sebastian
on 2 Apr 2023
Walter Roberson
on 2 Apr 2023
Linux can only run exe if you have a Windows simulation program installed.
I am not sure if current versions of MATLAB can be for Windows can be convinced to generate Linux executables, but I am pretty sure that the old version of MATLAB you are using cannot handle it.
Bello Sebastian
on 2 Apr 2023
Answers (0)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!