Main Content

compiler.build.Results

Compiler build results object

Description

A compiler.build.Results object contains information about the build type, generated files, and build options of a compiler.build function.

All Results properties are read-only. You can use dot notation to query these properties.

For information on results from compiling standalone applications, Excel® add-ins, or web app archives, see compiler.build.Results for MATLAB® Compiler™.

Creation

There are several ways to create a compiler.build.Results object.

Properties

expand all

This property is read-only.

The build type of the compiler.build function used to generate the results, specified as a character vector:

compiler.build FunctionBuild Type
compiler.build.productionServerArchive'productionServerArchive'
compiler.build.comComponent'comComponent'
compiler.build.cSharedLibrary'cSharedLibrary'
compiler.build.cppSharedLibrary'cppSharedLibrary'
compiler.build.dotNETAssembly'dotNETAssembly'
compiler.build.javaPackage'javaPackage'
compiler.build.pythonPackage'pythonPackage'

Data Types: char

This property is read-only.

Paths to the compiled files of the compiler.build function used to generate the results, specified as a cell array of character vectors.

Build TypeFiles
'productionServerArchive'

1×1 cell array

    {'path\to\ArchiveName.ctf'}
'comComponent'

2×1 cell array

    {'path\to\ComponentName_ComponentVersion.dll'}
    {'path\to\GettingStarted.html'}
'cSharedLibrary'

4×1 cell array

    {'path\to\LibraryName.h'}
    {'path\to\LibraryName.dll'}
    {'path\to\LibraryName.lib'}
    {'path\to\GettingStarted.html'}
'cppSharedLibrary'

2×1 or 4×1 cell array

Using the matlab-data interface:

    {'path\to\v2\'}    
    {'path\to\GettingStarted.html'}

Using the mwArray interface:

    {'path\to\LibraryName.h'}
    {'path\to\LibraryName.dll'}
    {'path\to\LibraryName.lib'}
    {'path\to\GettingStarted.html'}
'dotNETAssembly'

4×1 cell array

    {'path\to\AssemblyName.dll'}
    {'path\to\AssemblyNameNative.dll'}
    {'path\to\AssemblyName_overview.html'}
    {'path\to\GettingStarted.html'}
'javaPackage'

3×1 cell array

    {'path\to\PackageName.jar'}
    {'path\to\doc\'}
    {'path\to\GettingStarted.html'}
'pythonPackage'

3×1 cell array

    {'path\to\example\'}
    {'path\to\setup.py'}
    {'path\to\GettingStarted.html'}

Example: {'D:\Documents\MATLAB\work\MagicSquareproductionServerArchive\MagicSquare.ctf'}

Data Types: cell

This property is read-only.

Build options of the compiler.build function used to generate the results, specified as an options object of the corresponding build type.

Build TypeOptions
'productionServerArchive'ProductionServerArchiveOptions
'comComponent'COMComponentOptions
'cSharedLibrary'CSharedLibraryOptions
'cppSharedLibrary'CppSharedLibraryOptions
'dotNETAssembly'DotNETAssemblyOptions
'javaPackage'JavaPackageOptions
'pythonPackage'PythonPackageOptions

Examples

collapse all

Create a production server archive and save information about the build type, archive file, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.productionServerArchive(magicsquare.m')
results = 

  Results with properties:

            BuildType: 'productionServerArchive'
                Files: 'D:\Documents\MATLAB\work\magicsquareproductionServerArchive\magicsquare.ctf'
              Options: [1×1 compiler.build.ProductionServerArchiveOptions]

The Files property contains the path to the deployable archive file magicsquare.ctf.

Create a COM component on a Windows® system and save information about the build type, generated files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.comComponent('magicsquare.m')
results = 

  Results with properties:

            BuildType: 'comComponent'
                Files: {2×1 cell}
              Options: [1×1 compiler.build.COMComponentOptions]

The Files property contains the paths to the following compiled files:

  • magicsquare_1_0.dll

  • GettingStarted.html

Create a C library and save information about the build type, compiled files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.cSharedLibrary('magicsquare.m')
results = 

  Results with properties:

            BuildType: 'cSharedLibrary'
                Files: {4×1 cell}
              Options: [1×1 compiler.build.CSharedLibraryOptions]

The Files property contains the paths to the following files:

  • magicsquare.dll

  • magicsquare.lib

  • magicsquare.h

  • GettingStarted.html

Create a C++ library and save information about the build type, compiled files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.cppSharedLibrary('magicsquare.m')
results = 

  Results with properties:

            BuildType: 'cppSharedLibrary'
                Files: {2×1 cell}
              Options: [1×1 compiler.build.CppSharedLibraryOptions]

The Files property contains the paths to the v2 folder and GettingStarted.html.

Create a .NET assembly on a Windows system and save information about the build type, generated files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.dotNETAssembly('magicsquare.m')
results = 

  Results with properties:

            BuildType: 'dotNETAssembly'
                Files: {4×1 cell}
              Options: [1×1 compiler.build.DotNETAssemblyOptions]

The Files property contains the paths to the following compiled files:

  • magicsquare.dll

  • magicsquareNative.dll

  • magicsquare_overview.dll

  • GettingStarted.html

Create a Java package and save information about the build type, generated files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.javaPackage('magicsquare.m')
results = 

  Results with properties:

            BuildType: 'javaPackage'
                Files: {3×1 cell}
              Options: [1×1 compiler.build.JavaPackageOptions]

The Files property contains the paths to the following:

  • doc folder

  • magicsquare.jar

  • GettingStarted.html

Create a Python package and save information about the build type, generated files, and build options to a compiler.build.Results object.

Compile using the file magicsquare.m located in matlabroot\extern\examples\compiler.

results = compiler.build.pythonPackage('magicsquare.m');
results = 

  Results with properties:

            BuildType: 'pythonPackage'
                Files: {3×1 cell}
              Options: [1×1 compiler.build.PythonPackageOptions]

The Files property contains the paths to the following:

  • example folder

  • setup.py

  • GettingStarted.html

Introduced in R2020b