| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Compiler |
| Contents | Index |
| Learn more about MATLAB Compiler |
Bold entries in the Comment/Options column indicate default values.
| Option | Description | Comment/Options |
|---|---|---|
| -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:
|
| -c | Generate C wrapper code. | Equivalent to |
| -C | Directs mcc to not embed the CTF archive in C/C++ and main/Winmain shared libraries and standalone binaries by default. | See Overriding Default CTF Archive Embedding Using the MCR Component Cache 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 |
| -f filename | Use the specified options file, filename, when calling mbuild. | mbuild -setup is recommended. |
| -F project_name.prj | Use the specified project file as input to mcc. | When using -F, no other arguments can be invoked against mcc. |
| -g | Generate debugging information. | None |
| -G | Same as -g | None |
| -I directory | Add folder to search path for M-files. | MATLAB path is automatically included when running from MATLAB, but not when running from a DOS/UNIX shell. |
| -l | Macro to create a function library. | Equivalent to |
| -m | Macro to generate a C standalone application. | Equivalent to |
| -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 = |
| -S | Create Singleton MCR. | Requires MATLAB Builder NE |
| -v | Verbose; display compilation steps. | None |
| -w option | Display warning messages. | option = list level level:string where level = disable enable error |
| -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 |
| -z path | Specify path for library and include files. | None |
| -? | Display help message. | None |
![]() | Common Uses of MATLAB Compiler | Error and Warning Messages | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |