MATLAB Compiler | ![]() ![]() |
Porting Generated Code to a Different Platform
The code generated by the MATLAB Compiler is portable among platforms. However, if you build an executable from foo.m
on a PC running Windows, that same file will not run on a UNIX system.
For example, you cannot simply copy foo.
mex
(where the mex
extension varies by platform) from a PC to a Sun system and expect the code to work, because binary formats are different on different platforms (all supported executable types are binary). However, you could copy either all of the generated C code or foo.m
from the PC to the Sun system. Then, on the Sun platform you could use mex
or mcc
to produce a foo.
mex
that would work on the Sun system.
Note Stand-alone applications require that the MATLAB C/C++ Math Library be purchased for each platform where the Compiler-generated code will be executed. |
![]() | COM Components | Formatting Compiler-Generated Code | ![]() |