How can I make a standalone of a matlabfile on a mac computer and use the standalone on a linux computer?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
I have to make a standalone of some matlabfiles on a mac computer. This standalones must run on a linux computer. I use the matlab compiler, but this give me .app files? How do I get the right files for a linux computer? (I know that I have to install Matlab Runtime on the linux computer)
Accepted Answer
Walter Roberson
on 25 Aug 2015
You dual-boot the Mac into Linux and compile there.
It is not possible at this time to compile for a different operating system, with the exception that on 64 bit MS Windows systems if you use the 32 bit MATLAB then it can compile for 32 bit MS Windows (those are considered different operating systems families as the binaries are not compatible.)
7 Comments
So, if I want to run it on a Linux computer, I have to make the standalone on a Linux computer?
Thus I need to install Linux on my mac computer? And linux can use the matlab installation on my mac?
And in the case, someone else made a standalone, an .exe file. Then it is possible to run it on a Linux with the help of the package 'wine' ?
You would need to have Linux executing in order to compile to execute natively in Linux.
If you were to compile a standalone .exe on MS Windows, then I think you should be able to run it under wine, if the appropriate MCR and runtime libraries had been installed in the virtual operating system.
ok, thank you. What do you mean with "If you were to compile a standalone .exe on MS Windows, then I think you should be able to run it under wine, if the appropriate MCR and runtime libraries had been installed in the virtual operating system." ?
Do you mean I need to install the linux version of matlab runtime on the linux machine? Or do I need to install the Windows version of matlab runtime on the Linux machine?
You would have to use wine to install the MS Windows versions of MCR and any other required runtime libraries such as the VC++ 2006 Runtime Redistributable (or whatever is needed). You could use wine to run Dependency Walker
Diede
on 26 Aug 2015
Ok, thank you! I will try it. If it does not work, are then any other options? I saw something with making a matlabcode into java or c/c++ ?
If you were to use MATLAB Compiler SDK to build a java or .NET tool, then you would still need MCR.
If you were to use MATLAB Coder then if your code fits within the restrictions you could produce C or C++ code that could be compiled on any system.
Diede
on 26 Aug 2015
Ok, thank you. Thus the best for me is maybe to convert my matlab code into C or C++?
(I also try something with converting my matlab code to python and that python code into an exe)
More Answers (0)
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Tags
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)