| Contents | Index |
Bold entries in the Comment column indicate default values.
COM Components
| Option | Description | Comment |
|---|---|---|
| -u | Registers COM component for current user only on development machine | Valid only for generic COM components and Microsoft Excel add-ins (requiring MATLAB Builder EX) |
CTF Archive
| Option | Description | Comment |
|---|---|---|
| -a filename | Add filename to the CTF archive. | None |
| -C | Directs mcc to not embed the CTF archive in C/C++ and main/Winmain shared libraries and standalone binaries by default. | See MCR Component Cache and CTF Archive Embedding for more information. |
Debugging
| Option | Description | Comment |
|---|---|---|
| -g | Generate debugging information. | None |
| -G | Same as -g | None |
| -K | Directs mcc to not delete output files if the compilation ends prematurely, due to error. | mcc's default behavior is to dispose of any partial output if the command fails to execute successfully. |
| -v | Verbose; display compilation steps. | None |
| -W type | Control the generation of function wrappers. | type = main cpplib:<string> lib:<string> none com:compname, clname,version |
| -? | Display help message. | None |
Dependency Function (depfun) Processing
| Option | Description | Comment |
|---|---|---|
| -a filename | Add filename to the CTF archive. | None |
Licenses
| Option | Description | Comment |
|---|---|---|
| -Y licensefile | Use licensefile when checking out a MATLAB Compiler license. | None |
MATLAB Builder EX
| Option | Description | Comment |
|---|---|---|
| -b | Generate Excel compatible formula function. | Requires MATLAB Builder EX |
| -u | Registers COM component for current user only on development machine | Valid only for generic COM components and Microsoft Excel add-ins (requiring MATLAB Builder EX) |
MATLAB Path
| Option | Description | Comment |
|---|---|---|
| -I directory | Add folder to search path for MATLAB files. | MATLAB path is automatically included when running from MATLAB, but not when running from a DOS/UNIX shell. |
| -N | Clear the path of all but a minimal, required set of folders. | None |
| -p directory | Add directory to compilation path in an order-sensitive context. | Requires -N option |
mbuild
| Option | Description | Comment |
|---|---|---|
| -f filename | Use the specified options file, filename, when calling mbuild. | mbuild -setup is recommended. |
| -M string | Pass string to mbuild. | Use to define compile-time options. |
MATLAB Compiler Runtime (MCR)
| Option | Description | Comment |
|---|---|---|
| -Roption | Specify run-time options for MCR. | option = |
| -S | Create Singleton MCR. | Requires MATLAB Builder NE |
Override Default Inputs
| Option | Description | Comment |
|---|---|---|
| -B filename[:arg[,arg]] | Replace -B filename on the mcc command line with the contents of filename (bundle). | The file should contain only mcc command-line options. These are MathWorks included options files:
|
Override Default Outputs
| Option | Description | Comment |
|---|---|---|
| -d directory | Place output in specified folder. | None |
| -o outputfile | Specify name of final output file. | Adds appropriate extension |
| -e | Suppresses appearance of the MS-DOS Command Window when generating a standalone application. | Use -e in place of the -m option. Available for Windows only. Use with -R option to generate error logging. Equivalent to -W WinMain -T link:exe You
can suppress the MS-DOS command window when using deploytool by
creating a Windows Standalone Application. For information about creating
a Windows Standalone Application, open the Deployment Tool Help by
clicking the Actions icon (
|
Wrappers and Libraries
| Option | Description | Comment |
|---|---|---|
| -c | Generate C wrapper code. | Equivalent to |
| -l | Macro to create a function library. | Equivalent to |
| -m | Macro to generate a standalone application. | Equivalent to |
| -W type | Control the generation of function wrappers. | type = main cpplib:<string> lib:<string> none com:compname, clname,version |
![]() | mcc Command Arguments Listed Alphabetically | Using MATLAB Compiler on Mac or Linux | ![]() |

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |