mcc - Invoke the MATLAB® Compiler™ product

Syntax

mcc - W 'dotnet:component_name,class_name,
0.0|1.1|2.0, Private|Encryption_Key_Path'
file1[file2...fileN]
[class{class_name:file1 [,file2,...,fileN]},...]
[-d output_dir_path]
-T link:lib

Description

mcc is the MATLAB® command that invokes the MATLAB Compiler product. You can issue the mcc command either from the MATLAB command prompt (MATLAB mode) or the DOS or UNIX command line (standalone mode).

mcc prepares M-file(s) for deployment outside of the MATLAB environment. When used with the MATLAB® Builder™ NE product, wrapper files can be used with all CLS compliant languages, such as C#, Microsoft® Visual Basic® .NET, and C++ with Managed Extensions.

For each M-file, the main function is a method of the wrapper class generated by MATLAB Builder NE.

Options

The -W option is used when running mcc with MATLAB Builder NE.

For a complete list of all mcc command options, see mcc in the MATLAB Compiler User's Guide documentation.

-W

Tells the compiler to create a wrapper function. This option takes a string argument that specifies the following characteristics of the component.

-W String ElementsDescription
dotnet:Keyword that tells the compiler the type of component to create, followed by a colon. Specify dotnet to create a .NET component.
component_nameSpecifies the name of the component and its namespace, which is a period-separated list, such as companyname.groupname.component.
class_nameSpecifies the name of the .NET class to be created.
0.0|1.1|2.0Specifies the version of the .NET framework you want to use to compile the component. You can specify one of three values:
0.0 — Use latest supported version on the target machine
1.1 — Use Version 1.1 of the framework
2.0 — Use Version 2.0 of the framework
Private|Encryption_Key_PathSpecifies whether the component to be created is a private assembly or a shared assembly. To create a shared assembly, you must specify the full path to the encryption key file used to sign the assembly.

file1 [file2...fileN]

Specifies the M-file or M-files that are to be encapsulated as methods in the class being created (class_name).

class{class_name:file1 [,file2,...,fileN]},...

(Optional) Specifies additional classes that you want to include in the component. To use this option, you specify the class name, followed by a colon, and then the names of the files you want to include in the class. You can include this multiple times to specify multiple classes.

[-d output_dir_path]

(Optional) Tells the builder to create a directory and copy the output files to it. If you use mcc instead of the Deployment Tool, the project_directory\src and project_directory\distrib directories are not automatically created.

-T

Specifies the output type. To create a .NET component, specify the keyword link:lib, which links objects into a shared library (DLL).

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS