Skip to Main Content Skip to Search
Product Documentation

mcc Command Arguments Listed Alphabetically

Bold entries in the Comment column indicate default values.

OptionDescriptionComment
-a filename

Add filename to the CTF archive.

None

-b

Generate Excel compatible formula function.

Requires MATLAB Builder EX

-B filename[:arg[,arg]]

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

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

-c

Generate C wrapper code.

Equivalent to
-T codegen

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

-d directory

Place output in specified folder.

None

-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 ( ).

-f filename

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

mbuild -setup is recommended.

-g

Generate debugging information.

None

-G

Same as -g

None

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

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

-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

-M string

Pass string to mbuild.

Use to define compile-time options.

-N

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

None

-o outputfile

Specify name of final output file.

Adds appropriate extension

-p directory

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

Requires -N option

-Roption

Specify run-time options for MCR.

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

-S

Create Singleton MCR.

For COM components only. Requires MATLAB Builder NE or 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)

-v

Verbose; display compilation steps.

None

-w option

Display warning messages.

option = list
level
level:string
where level = disable
              enable
              error
              error
[off:string | on:string]
-W type

Control the generation of function wrappers.

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

Use licensefile when checking out a MATLAB Compiler license.

None

-?

Display help message.

None

  


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