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

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.
Hello~. Thank you.
Yes, .sh is a shell script that runs a executable,e.g. xxx.sh cript runs the xxx executable. So, my question is if Linux can run a .exe? Or, if compiling in Matlab on Windows I can generate a Executable to run in Linux?
regards,
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.
Yes, That's what I thought. Thank you

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

질문:

2023년 4월 2일

댓글:

2023년 4월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by