Using the mcc Command

Instead of the GUI, you can use the mcc command to run MATLAB Compiler. The following table shows sample commands to create a standalone application or a shared library using mcc at the operating system prompt.

Desired ResultCommand
Standalone application from the M-file mymfunction
mcc -m mymfunction.m
Creates a standalone application named mymfunction.exe on Windows platforms and mymfunction on platforms that are not Windows.
Shared library from the M-file mymfunction
mcc -l mymfunction.m
Creates a shared library named mymfunction.dll on Windows, mymfunction.so on Linux® and Solaris™, and mymfunction.dylib on Mac OS® X.
C shared library from the M-files file1.m, file2.m, and file3.m
mcc -l file1.m file2.m file3.m
Creates a shared library named file1.dll on Windows, file1.so on Linux and Solaris, and file1.dylib on Mac OS X.
C++ shared library from the M-files file1.m, file2.m, and file3.m
mcc -l file1.m file2.m file3.m -W cpplib -T link:lib
Creates a shared library named file1.dll on Windows, file1.so on Linux and Solaris, and file1.dylib on Mac OS X.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS