Compile MATLAB functions for deployment
mcc options mfilename1,...,mfilenameN
mcc -l options mfilename1,...,mfilenameN
mcc -c options mfilename1,...,mfilenameN
mcc -W cpplib:library_name
-T
link:lib options mfilename1,...,mfilenameN
mcc -W com:component_name
,className
-T link:lib options class{className
:mfilename1,...,mfilenameN}
mcc -W dotnet:assembly_name
,className
,framework_version
,security
,remote_type
-T
link:lib options mfilename1,...,mfilenameN
mcc -W dotnet:assembly_name
,className
,framework_version
,security
,remote_type
-T
link:lib options class{className
:mfilename1,...,mfilenameN}
mcc -W java:packageName
,className
options mfilename1,...,mfilenameN
mcc -W java:packageName
,className
options class{className
:mfilename1,...,mfilenameN}
mcc -W python:namespace
.packageName
-T
link:lib options mfilename1,...,mfilenameN
mcc -W CTF:archive_name
-U options mfilename1,...,mfilenameN
mcc -W mpsxl:addin_name
,className
,version
input_marshaling_flags
output_marshaling_flags
-T
link:lib options mfilename1,...,mfilenameN
mcc
compiles
the functions as specified by the options.options
mfilename1,...,mfilenameN
The options used depend on the intended results of the compilation. For information on compiling:
standalone applications, Excel® add-ins,
or Hadoop® jobs see mcc
for MATLAB®
Compiler™
mcc -l
compiles
the listed functions into a C shared library and generates C wrapper
code for integration with other applications.options
mfilename1,...,mfilenameN
This syntax is equivalent to -W lib:
.libname
-T
link:lib
mcc -c
generates
C wrapper code for the listed functions.options
mfilename1,...,mfilenameN
This is equivalent to -W lib:
.libname
-T
codegen
mcc -W cpplib:
compiles the listed functions into a C++ shared library and generates
C++ wrapper code for integration with other applications.library_name
-T
link:lib options
mfilename1,...,mfilenameN
library_name
— Specifies
the name of the shared library.
mcc -W com:
compiles the listed functions into a generic Microsoft® COM component.component_name
,className
-T link:lib options
class{className
:mfilename1,...,mfilenameN
}
component_name
— Specifies the name
of the COM component.
className
— Specifies the name of
the class.
mcc -W dotnet:
creates a .NET assembly with a single class from the specified files.assembly_name
,className
,framework_version
,security
,remote_type
-T
link:lib options
mfilename1,...,mfilenameN
assembly_name
—
Specifies the name of the assembly preceded by its namespace, which
is a period-separated list, such as companyname.groupname.component
.
className
— Specifies
the name of the .NET class to be created.
framework_version
—
Specifies the version of the Microsoft .NET Framework you want
to use to compile the assembly. Specify either:
0.0
— Use the latest supported
version on the target machine.
—
Use a specific version of the framework.version_major
.version_minor
Features are often version-specific. Consult the documentation for the feature you are implementing to get the Microsoft .NET Framework version requirements.
security
— Specifies
whether the assembly to be created is a private assembly or a shared
assembly.
To create a private assembly, specify Private
.
To create a shared assembly, specify the full path to the encryption key file used to sign the assembly.
remote_type
— Specifies
the remoting type of the assembly. Values are remote
and local
.
mcc -W dotnet:
creates a .NET assembly with multiple classes from the specified files.assembly_name
,className
,framework_version
,security
,remote_type
-T
link:lib options
class{className
:mfilename1,...,mfilenameN
}
assembly_name
—
Specifies the name of the assembly and its namespace, which is a period-separated
list, such as companyname.groupname.component
.
className
— Specifies
the name of the .NET class to be created.
You can include multiple class specifiers.
framework_version
—
Specifies the version of the Microsoft .NET Framework you want
to use to compile the assembly. Specify either:
0.0
— Use the latest supported
version on the target machine.
—
Use a specific version of the framework.version_major
.version_minor
Features are often version-specific. Consult the documentation for the feature you are implementing to get the Microsoft .NET Framework version requirements.
security
— Specifies
whether the assembly to be created is a private assembly or a shared
assembly.
To create a private assembly, specify Private
.
To create a shared assembly, specify the full path to the encryption key file used to sign the assembly.
remote_type
— Specifies
the remoting type of the assembly. Values are remote
and local
.
mcc -W java:
creates a Java® package from the specified files.packageName
,className
options
mfilename1,...,mfilenameN
packageName
— Specifies
the name of the Java package and its namespace, which is a period-separated
list, such as companyname.groupname.component
.
className
— Specifies
the name of the class to be created. If you do not specify the class
name, mcc
uses the last item in packageName
.
mcc -W java:
creates a Java package with multiple classes from the specified
files.packageName
,className
options
class{className
:mfilename1,...,mfilenameN
}
packageName
— Specifies
the name of the Java package and its namespace, which is a period-separated
list, such as companyname.groupname.component
.
className
— Specifies
the name of the class to be created. If you do not specify the class
name, mcc
uses the last item in packageName
.
You can include multiple class specifiers.
mcc -W python:
creates
a Python® package from the specified files.namespace
.packageName
-T
link:lib options
mfilename1,...,mfilenameN
namespace
— Specifies
the optional namespace for the package, which is a period-separated
list, such as companyname.groupname.component
packageName
— Specifies
the name of the Python package.
mcc -W CTF:
instructs the compiler to create a deployable archive (archive_name
-U
options
mfilename1,...,mfilenameN
.ctf
file) for use with a MATLAB
Production Server™ instance.
The syntax also creates the server-side deployable archive
(.ctf
file) for Microsoft
Excel add-ins.
mcc -W mpsxl:
creates a client-side Microsoft
Excel add-in from the
specified files that can be used to send requests to MATLAB
Production Server from Excel. Creating the client-side add-in must be
preceded by creating a server-side deployable archive (addin_name
,className
,version
input_marshaling_flags
output_marshaling_flags
-T
link:lib options
mfilename1,...,mfilenameN
.ctf
file) from the specified files. A purely client side add-in is not viable.
addin_name
— Specifies
the name of the add-in and its namespace, which is a period-separated
list, such as companyname.groupname.component
.
className
— Specifies
the name of the class to be created. If you do not specify the class
name, mcc
uses the addin_name
as
the default.
version
— Specifies
the version of the add-in specified as major
.minor
.
major
— Specifies
the major version number. If you do not specify a version number, mcc
uses
the latest version.
minor
— Specifies
the minor version number. If you do not specify a version number, mcc
uses
the latest version.
input_marshaling_flags
—
Specifies options for how data is marshaled between Microsoft
Excel and MATLAB.
-replaceBlankWithNaN
— Specifies
that a blank in Microsoft
Excel is mashaled into NaN in MATLAB.
If you do not specify this flag, blanks are marshaled into 0.
-convertDateToString
— Specifies
that dates in Microsoft
Excel are marshaled into MATLAB character
vectors. If you do not specify this flag, dates are marshaled into MATLAB doubles.
output_marshaling_flags
—
Specifies options for how data is marshaled between MATLAB and Microsoft
Excel.
-replaceNaNWithZero
— Specifies
that NaN in MATLAB is marshaled into a 0 in Microsoft
Excel.
If you do not specify this flag, NaN is marshaled into #QNAN
in Visual Basic®.
-convertNumericToDate
— Specifies that MATLAB numeric values are marshaled into Microsoft
Excel dates. If you do not specify this flag,
Microsoft
Excel does not receive dates as output.
cpplib:myMagic -T link:lib magic.m
mcc -W java:myMatrix,add class{add:add.m} class{sub:minus.m}
mcc -W python:myMagic -T link:lib magic.m