How to generate a Linux executable from a Windows machine using MCC ? (R2016a)
显示 更早的评论
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 个评论
Walter Roberson
2023-4-2
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
2023-4-2
Walter Roberson
2023-4-2
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
2023-4-2
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!