Main Content

mcc Command Arguments Listed Alphabetically

OptionDescriptionComment
-? (MATLAB Compiler)

Display mcc help message.

Cannot be used in a deploytool app.

-a filepath (MATLAB Compiler)

Add filepath to the deployable archive.

If you specify a folder name, all files in the folder are added. If you use a wildcard (*), all files matching the wildcard are added.

-A arch (MATLAB Compiler)

Append supported platforms to those detected automatically by the compiler.

Valid only for Python®, C/C++ using the MATLAB® data array API, and Java® targets.

arch = win64, maci64, glnxa64, or all

-b (MATLAB Compiler)

Generate Excel® compatible formula function.

Requires MATLAB Compiler™ for Excel add-ins. Cannot be used in a deploytool app.

-B bundle[:parameters] (MATLAB Compiler)

Replace -B bundle on the mcc command line with the contents of bundle.

The file should contain only mcc command-line options. MathWorks® included bundle files are located in matlabroot\toolbox\compiler\bundles.

-c (MATLAB Compiler)

Suppress compiling and linking of the generated C wrapper code.

Must be used in conjunction with the -l option.

-C (MATLAB Compiler)

Direct mcc to not embed the deployable archive in generated binaries.

 
-d outputfolder (MATLAB Compiler)

Place output in folder specified by outputfolder.

The specified folder must already exist. Cannot be used in a deploytool app.
-e (MATLAB Compiler)

Suppress appearance of the MS-DOS Command Window when generating a standalone application.

Use -e in place of the -m option. Available for Windows® only. Equivalent to -W WinMain -T link:exe. Cannot be used in a deploytool app.

The standalone app compiler suppresses the MS-DOS command window by default. To enable it, deselect Do not display the Windows Command Shell (console) for execution in the Additional Runtime Settings area.

-f filename (MATLAB Compiler)

Use the specified options file, filename, when calling mbuild.

mbuild -setup is recommended. Valid for C/C++ shared libraries, COM, and Excel targets.

-G (MATLAB Compiler)

Include debugging symbol information for generated C/C++ code.

 

-h helpfile (MATLAB Compiler)

Specify a custom help text file.

Display help file contents at runtime using -? or /?. Valid for standalone applications, C/C++ shared libraries, COM, and Excel targets.

-I folder (MATLAB Compiler)

Add folder to search path for MATLAB files.

 
-j (MATLAB Compiler)

Automatically convert all .m files to P-files before packaging.

 
-J filename (MATLAB Compiler)

Specify a secret manifest JSON file to embed the specified secret keys in the deployable archive.

 
-k 'file=<keyfile>;loader=<mexfile>' (MATLAB Compiler)

Specify AES encryption key keyfile and MEX-file loader interface mexfile to retrieve decryption key at runtime.

If you do not specify any arguments after -k, mcc generates a 256-bit AES key and a loader MEX-file.

-K (MATLAB Compiler)

Direct mcc to not delete output files if the compilation ends prematurely, due to error.

Default behavior is to dispose of any partial output if the command fails to execute successfully.

-l (MATLAB Compiler)

Create a C shared library.

Equivalent to -W lib -T link:lib. Cannot be used in a deploytool app.

-m (MATLAB Compiler)

Generate a standalone application.

Equivalent to -W main -T link:exe. Cannot be used in a deploytool app.

On Windows, the command prompt opens on execution of the application.

The standalone app compiler suppresses the MS-DOS command window by default. To enable it, deselect Do not display the Windows Command Shell (console) for execution in the Additional Runtime Settings area.

-M options (MATLAB Compiler)

Pass compile-time options to mbuild.

 
-n (MATLAB Compiler)

Automatically treat numeric inputs as MATLAB doubles.

Cannot be used in a deploytool app.

-N (MATLAB Compiler)

Clear the path of all but a minimal, required set of folders.

Uses the following folders:

  • matlabroot\toolbox\matlab

  • matlabroot\toolbox\local

  • matlabroot\toolbox\compiler

  • matlabroot\toolbox\shared\bigdata

-o executablename (MATLAB Compiler)

Specify name of standalone application executable file.

Adds appropriate extension. Cannot be used in a deploytool app.

-p folder (MATLAB Compiler)

Add folder to compilation path in an order-sensitive context.

Requires -N option.

-r icon (MATLAB Compiler)

Embed resource icon in binary.

 

-R option (MATLAB Compiler)

Specify run-time options for MATLAB Runtime.

Valid only for standalone applications using MATLAB Compiler.

option = -nojvm, -nodisplay, '-logfile filename', -startmsg, and -completemsg filename

-s (MATLAB Compiler)

Obfuscate folder structures and file names in the deployable archive (.ctf file) from the end user.

 
-S (MATLAB Compiler)

Create singleton MATLAB Runtime.

Default for generic COM components. Valid for Microsoft® Excel and Java packages.

-T phase:type (MATLAB Compiler)

Specify the output target phase and type.

Cannot be used in a deploytool app.

-u (MATLAB Compiler)

Register COM component for current user only on development machine.

Valid only for generic COM components and Microsoft Excel add-ins.

-U (MATLAB Compiler)

Generate a deployable archive (.ctf file) for MATLAB Production Server™.

Equivalent to -W 'CTF'. Cannot be used in a deploytool app.

-v (MATLAB Compiler)

Verbose; display compilation steps.

 

-w option[:warning] (MATLAB Compiler)

Control warning messages.

Valid arguments are list, enable[:warning], disable[:warning], error[:warning], on[:warning], and off[:warning].

-W 'target[:options]' (MATLAB Compiler)

Specify build target and associated options.

target = main, WinMain, excel, hadoop, spark, lib, cpplib, com, or dotnet, java, python, CTF, or mpsxl.

Cannot be used in a deploytool app.

-X (MATLAB Compiler)

Ignore data files detected by dependency analysis.For more information, see Dependency Analysis Using MATLAB Compiler (MATLAB Compiler).
-Y licensefile (MATLAB Compiler)Override the default license file with the specified file licensefile.

Can only be used on the system command line.

-Z supportpackage (MATLAB Compiler)Specify method of including support packages.

supportpackage = 'autodetect' (default), 'none', or packagename.

Packaging Log and Output Folders

By default, the deployment app places the packaging log and the Testing Files, End User Files, and Packaged Installers folders in the target folder location. If you specify a custom location, the app creates any folders that do not exist at compile time.