Skip to Main Content Skip to Search
Product Documentation

mcc Command Line Arguments Grouped by Task

Bold entries in the Comment column indicate default values.

COM Components

OptionDescriptionComment
-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

OptionDescriptionComment
-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

OptionDescriptionComment
-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

OptionDescriptionComment
-a filename

Add filename to the CTF archive.

None

Licenses

OptionDescriptionComment
-Y licensefile

Use licensefile when checking out a MATLAB Compiler license.

None

MATLAB Builder EX

OptionDescriptionComment
-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

OptionDescriptionComment
-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

OptionDescriptionComment
-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)

OptionDescriptionComment
-Roption

Specify run-time options for MCR.

option =
      -nojvm
      -nodisplay
      -logfile filename
      -startmsg
      -completemsg filename

-S

Create Singleton MCR.

Requires MATLAB Builder NE

Override Default Inputs

OptionDescriptionComment
-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:

  • -B csharedlib:foo — C shared library

  • -B cpplib:foo — C++ library

Override Default Outputs

OptionDescriptionComment
-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

OptionDescriptionComment
-c

Generate C wrapper code.

Equivalent to
-T codegen

-l

Macro to create a function library.

Equivalent to
-W lib -T link:lib

-m

Macro to generate a standalone application.

Equivalent to
-W main -T link:exe

-W type

Control the generation of function wrappers.

type = main
         cpplib:<string>
        lib:<string>
             none
         com:compname,
clname,version

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS