Skip to Main Content Skip to Search
Product Documentation

mcc - Invoke MATLAB Compiler

Syntax

mcc -win32 -W 'dotnet:component_name,class_name,
framework_version,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 MATLAB 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 MATLAB 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.
framework_versionSpecifies the version of the Microsoft .NET Framework you want to use to compile the component. You can specify either:
0.0 — Use the latest supported version on the target machine.
verion_major.version_minor — Use a specific version of the framework (for example, 2.0). Feature are often version-specific. Consult the documentation for the feature you are implementing to get the Microsoft .NET Framework version requirements.
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.
local|remoteSpecifies the remoting type of the component. See .NET Remoting.

file1 [file2...fileN]

Specifies the MATLAB 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 folder and copy the output files to it. If you use mcc instead of the Deployment Tool, the project_folder\src and project_folder\distrib folders are not automatically created.

-C

Overrides automatically embedding the CTF archive in builder-generated .NET or COM components. See for details.

-T

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

-win32 Run in 32-Bit Mode

Use this option to build a 32-bit application on a 64-bit system only when the following are both true:

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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