compiler.build.Results
编译器编译结果对象
说明
compiler.build.Results
对象包含有关 compiler.build
函数的构建类型、生成的文件、支持包、构建选项和依赖关系的信息。
所有 Results
属性都是只读的。您可以使用点符号来查询这些属性。
使用 MATLAB® Compiler™,您可以创建独立应用程序、Excel® 加载项或 Web App 存档。
使用 MATLAB Compiler SDK™,您可以为 MATLAB MATLABProduction Server™ 创建 C/C++ 共享库、.NET 程序集、COM 组件、Java® 包、Python® 包、MATLAB Production Server 可部署存档或 Excel 加载项。
创建对象
有几种方法可以创建 compiler.build.Results
对象。
使用
compiler.build.standaloneApplication
创建独立应用程序(示例)。使用
compiler.build.standaloneWindowsApplication
创建独立的 Windows® 应用程序(示例)。使用
compiler.build.webAppArchive
创建 Web App 存档(示例)。使用
compiler.build.excelAddIn
创建 Excel 加载项(示例)。
如果您有 MATLAB Compiler SDK 许可证,您还可以创建以下对象。
使用
compiler.build.cSharedLibrary
创建 C 共享库(示例)。使用
compiler.build.cppSharedLibrary
创建 C++ 共享库(示例)。使用
compiler.build.dotNETAssembly
创建 .NET 程序集(示例)。使用
compiler.build.javaPackage
创建 Java 包(示例)。使用
compiler.build.pythonPackage
创建 Python 包(示例)。使用
compiler.build.productionServerArchive
创建生产服务器存档(示例)。使用
compiler.build.excelClientForProductionServer
针对 MATLAB Production Server 创建 Excel 加载项(示例)。使用
compiler.build.comComponent
(示例)创建一个 COM 组件。
属性
此属性为只读。
用于生成结果的 compiler.build
函数的构建类型,指定为字符向量:
compiler.build 函数 | 编译类型 |
---|---|
compiler.build.standaloneApplication | 'standaloneApplication' |
compiler.build.standaloneWindowsApplication | 'standaloneWindowsApplication' |
compiler.build.webAppArchive | 'webAppArchive' |
compiler.build.productionServerArchive | 'productionServerArchive' |
compiler.build.excelAddIn | 'excelAddIn' |
compiler.build.comComponent | 'comComponent' |
compiler.build.cSharedLibrary | 'cSharedLibrary' |
compiler.build.cppSharedLibrary | 'cppSharedLibrary' |
compiler.build.dotNETAssembly | 'dotNETAssembly' |
compiler.build.javaPackage | 'javaPackage' |
compiler.build.pythonPackage | 'pythonPackage' |
compiler.build.excelClientForProductionServer | 'excelClientForProductionServer' |
数据类型: char
此属性为只读。
用于生成结果的 compiler.build
函数的编译文件的路径,指定为字符向量元胞数组。
编译类型 | 文件 |
---|---|
'standaloneApplication' | 2×1 元胞数组 {'path\to\ExecutableName.exe'} {'path\to\readme.txt'} |
'standaloneWindowsApplication' | 3×1 元胞数组 {'path\to\ExecutableName.exe'} {'path\to\splash.png'} {'path\to\readme.txt'} |
'webAppArchive' | 1×1 元胞数组 {'path\to\ArchiveName.ctf'} |
'productionServerArchive' | 1×1 元胞数组 {'path\to\ArchiveName.ctf'} |
'excelAddIn' | 2×1 或 4×1 元胞数组 {'path\to\AddInName_AddInVersion.dll'} {'path\to\AddInName.bas'} {'path\to\AddInName.xla'} {'path\to\GettingStarted.html'} 注意 仅当您启用 |
'comComponent' | 2×1 元胞数组 {'path\to\ComponentName_ComponentVersion.dll'} {'path\to\GettingStarted.html'} |
'cSharedLibrary' | 4×1 元胞数组 {'path\to\LibraryName.h'} {'path\to\LibraryName.dll'} {'path\to\LibraryName.lib'} {'path\to\GettingStarted.html'} |
'cppSharedLibrary' | 2×1 或 4×1 元胞数组 使用 {'path\to\v2\'} {'path\to\GettingStarted.html'} 使用 {'path\to\LibraryName.h'} {'path\to\LibraryName.dll'} {'path\to\LibraryName.lib'} {'path\to\GettingStarted.html'} |
'dotNETAssembly' | 4×1 元胞数组 {'path\to\AssemblyName.dll'} {'path\to\AssemblyNameNative.dll'} {'path\to\AssemblyName_overview.html'} {'path\to\GettingStarted.html'} |
'javaPackage' | 3×1 元胞数组 {'path\to\PackageName.jar'} {'path\to\doc\'} {'path\to\GettingStarted.html'} |
'pythonPackage' | 3×1 元胞数组 {'path\to\example\'} {'path\to\setup.py'} {'path\to\GettingStarted.html'} |
'excelClientForProductionServer' | 1×1 或 3×1 元胞数组 {'path\to\AddInName.dll'} {'path\to\AddInName.bas'} {'path\to\AddInName.xla'} 注意 仅当您启用 |
示例: {'D:\Documents\MATLAB\work\MagicSquarewebAppproductionServerArchive\MagicSquare.ctf'}
数据类型: cell
此属性为只读。
生成的组件中包含的支持包,指定为字符向量元胞数组。
此属性为只读。
用于生成结果的 compiler.build
函数的构建选项,指定为相应构建类型的选项对象。
编译类型 | 选项 |
---|---|
'standaloneApplication' | StandaloneApplicationOptions |
'standaloneWindowsApplication' | StandaloneApplicationOptions |
'webAppArchive' | WebAppArchiveOptions |
'productionServerArchive' | ProductionServerArchiveOptions |
'excelAddIn' | ExcelAddInOptions |
'comComponent' | COMComponentOptions |
'cSharedLibrary' | CSharedLibraryOptions |
'cppSharedLibrary' | CppSharedLibraryOptions |
'dotNETAssembly' | DotNETAssemblyOptions |
'javaPackage' | JavaPackageOptions |
'pythonPackage' | PythonPackageOptions |
'excelClientForProductionServer' | ExcelClientForProductionServerOptions |
此属性为只读。
生成的组件的运行时依赖项,指定为包含两个表 Required
和 Optional
的 Dependencies
对象。每个表包含一组依赖项。
示例
创建一个独立应用程序,并将有关编译类型、生成的文件、包含的支持包和编译选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.standaloneApplication('magicsquare.m')
results = BuildType: 'standaloneApplication' Files: {2×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.StandaloneApplicationOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含 magicsquare
独立可执行文件和 readme.txt
文件的路径。
在 Windows 系统上创建一个独立的 Windows 应用程序,并将有关构建类型、生成的文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 Mortgage.mlapp
进行编译。
results = compiler.build.standaloneWindowsApplication('Mortgage.mlapp')
results = Results with properties: BuildType: 'standaloneWindowsApplication' Files: {3×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.StandaloneApplicationOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下文件的路径:
Mortgage.exe
splash.png
readme.txt
创建一个 Web App 存档,并将有关构建类型、存档文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 Mortgage.mlapp
进行编译。
results = compiler.build.webAppArchive('Mortgage.mlapp')
results = Results with properties: BuildType: 'webAppArchive' Files: {'D:\Documents\MATLAB\work\MortgagewebAppArchive\Mortgage.ctf'} IncludedSupportPackages: {} Options: [1×1 compiler.build.WebAppArchiveOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含可部署存档文件 Mortgage.ctf
的路径。
创建生产服务器存档并将有关构建类型、存档文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.productionServerArchive('magicsquare.m')
results = Results with properties: BuildType: 'productionServerArchive' Files: {'D:\Documents\MATLAB\work\magicsquareproductionServerArchive\magicsquare.ctf'} IncludedSupportPackages: {} Options: [1×1 compiler.build.ProductionServerArchiveOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含可部署存档文件 magicsquare.ctf
的路径。
创建一个 Excel 加载项并将有关构建类型、生成的文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.excelAddIn('magicsquare.m')
results = Results with properties: BuildType: 'excelAddIn' Files: {2×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.ExcelAddInOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下已编译文件的路径:
magicsquare_1_0.dll
GettingStarted.html
注意
仅当您在构建命令中启用 magicsquare.bas
选项时,文件 magicsquare.xla
和 Files
才会包含在 'GenerateVisualBasicFile'
中。
在 Windows 系统上创建一个 COM 组件,并将有关构建类型、生成的文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.comComponent('magicsquare.m')
results = Results with properties: BuildType: 'comComponent' Files: {2×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.COMComponentOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下已编译文件的路径:
magicsquare_1_0.dll
GettingStarted.html
创建一个 C 库并将有关构建类型、编译文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.cSharedLibrary('magicsquare.m')
results = Results with properties: BuildType: 'cSharedLibrary' Files: {4×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.CSharedLibraryOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下文件的路径:
magicsquare.dll
magicsquare.lib
magicsquare.h
GettingStarted.html
创建一个 C++ 库,并将有关编译类型、编译的文件、支持包和编译选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.cppSharedLibrary('magicsquare.m')
results = Results with properties: BuildType: 'cppSharedLibrary' Files: {2×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.CppSharedLibraryOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含 v2
文件夹和 GettingStarted.html
的路径。
在 Windows 系统上创建一个 .NET 程序集,并将有关构建类型、生成的文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.dotNETAssembly('magicsquare.m')
results = Results with properties: BuildType: 'dotNETAssembly' Files: {4×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.DotNETAssemblyOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下已编译文件的路径:
magicsquare.dll
magicsquareNative.dll
magicsquare_overview.dll
GettingStarted.html
创建一个 Java 包,并将有关编译类型、生成的文件、包含的支持包和编译选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.javaPackage('magicsquare.m')
results = Results with properties: BuildType: 'javaPackage' Files: {3×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.JavaPackageOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下各项的路径:
doc
文件夹magicsquare.jar
GettingStarted.html
创建一个 Python 包,并将有关编译类型、生成的文件、包含的支持包和编译选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
进行编译。
results = compiler.build.pythonPackage('magicsquare.m');
results = Results with properties: BuildType: 'pythonPackage' Files: {3×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.PythonPackageOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下各项的路径:
example
文件夹setup.py
GettingStarted.html
为 MATLAB Production Server 创建一个 Excel 加载项,并将有关构建类型、生成的文件、包含的支持包和构建选项的信息保存到 compiler.build.Results
对象中。
使用文件 magicsquare.m
构建 MATLAB Production Server 存档。将输出保存为 compiler.build.Results
对象 serverBuildResults
。
serverBuildResults = compiler.build.productionServerArchive('magicsquare.m');
使用 serverBuildResults
对象构建 Excel 加载项。
results = compiler.build.excelClientForProductionServer(serverBuildResults)
results = Results with properties: BuildType: 'excelClientForProductionServer' Files: {1×1 cell} IncludedSupportPackages: {} Options: [1×1 compiler.build.ExcelClientForProductionServerOptions] RuntimeDependencies: [1×1 compiler.runtime.Dependencies]
Files
属性包含以下已编译文件的路径:
magicsquare.dll
magicsquare.bas
magicsquare.xla
注意
仅当您在 compiler.build.excelClientForProductionServer
命令中启用 magicsquare.bas
选项时,文件 magicsquare.xla
和 Files
才会包含在 'GenerateVisualBasicFile'
中。
版本历史记录
在 R2020b 中推出
另请参阅
compiler.build.standaloneApplication
| compiler.build.standaloneWindowsApplication
| compiler.build.webAppArchive
| compiler.build.productionServerArchive
| compiler.build.excelAddIn
| compiler.build.comComponent
| compiler.build.cSharedLibrary
| compiler.build.cppSharedLibrary
| compiler.build.dotNETAssembly
| compiler.build.javaPackage
| compiler.build.pythonPackage
| compiler.build.excelClientForProductionServer
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)