| MATLAB® Builder™ EX | ![]() |
mcc -W 'excel:component_name,class_name,major.minor' [-b] [-T link:lib file1..[filen]] [-d output_dir_path] mcc -B 'cexcel:component_name,class_name,major.minor' [-d output_dir_path]
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).
The -W option is used when running mcc with the builder.
Note For a complete list of all mcc command options, see mcc in the MATLAB Compiler User's Guide documentation. |
Tells the compiler to create an Excel® wrapper. This option takes a string argument that specifies the following characteristics of the component.
| -W String Elements | Description |
|---|---|
| excel: | Keyword that tells the compiler the type of component to create, followed by a colon. Specify excel to create an Excel component. |
| component_name | Specifies the name of the component to be created. |
| class_name | Specifies the name of the class to be created. If you do not specify the class name, mcc uses the component name as the default. |
| major | Specifies the major version number (for example, 1 in 1.0). If you do not specify a version number, mcc uses the latest version built or 1.0, if there is no previous version. |
| minor | Specifies the minor version number (for example, 0 in 1.0). If you do not specify a version number, mcc uses the latest version built or 1.0, if there is no previous version. |
(Optional) Tells 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.
(Optional) Tells the compiler to create a DLL. Specify the keyword link:lib, which links objects into a shared library (DLL).
(Optional) Generates an Excel-compatible formula function for each M-file.
Tells the compiler to use the cexcel bundle file option to simplify command line entry. By using this alternative to the -W option, the -T or the -b options do not need to be specified.
| -B String Elements | Description |
|---|---|
| cexcel: | Keyword that tells the compiler to create an Excel component using the bundle file option. |
| component_name | Specifies the name of the component to be created. |
| class_name | Specifies the name of the class to be created. If you do not specify the class name, mcc uses the component name as the default. |
| major | Specifies the major version number (for example, 1 in 1.0). If you do not specify a version number, mcc uses the latest version built or 1.0, if there is no previous version. |
| minor | Specifies the minor version number (for example, 0 in 1.0). If you do not specify a version number, mcc uses the latest version built or 1.0, if there is no previous version. |
(Optional) Tells 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.
mcc -W 'excel:mycomponent,myclass,1.0' -T link:lib foo.m bar.m
This example shows the mcc command used to create a COM component called mycomponent containing single COM class named myclass with methods foo and bar, and a version of 1.0 (note both major and minor versions are coded). The -T option tells mcc to create a DLL.
mcc -W 'excel:mycomponent,myclass,1.0' -b -T link:lib foo.m bar.m
To generate an Excel-compatible formula function for each M-file, specify the -b option.
mcc -B 'cexcel:mycomponent,myclass,1.0' foo.m bar.m
As an alternative to using the excel keyword, use the cexcel bundle file option to simplify command line input. In the example, note how you do not need to specify the -T or the -b options when using -B.
![]() | deploytool | Utility Library for Microsoft® COM Components | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |