Build Configuration
Configuration of build settings such as output file name, location, type, language
为了控制和配置生成二进制代码的构建过程,有许多参数和设置。这些设置控制属性,例如输出构建类型(MEX,LIB,DLL或EXE)和C与C ++语言。其他构建设置使您可以根据特定需求(例如可读性,性能和外部代码集成)自定义构建输出。您可以从应用程序或命令行中修改代码生成配置对象中的构建选项。您可以使用代码r.config
. Open the object in the editing app by usingopen
. To specify additional build files and flags from inside your function code, use编码器。UpdateBuildInfo
.
Functions
Classes
target.Alias |
为目标对象创建替代标识符 |
target.LanguageImplementation |
Provide C and C++ compiler implementation details |
target.Object |
Base class for target types |
Target.Sroucessor |
Provide target processor information |
代码r.ExternalDependency |
Interface to external code |
Objects
coder.mexcodeconfig |
MEX功能生成的配置参数MATLAB代码 |
Coder.CodeConfig |
Configuration parameters for C/C++ code generation fromMATLAB代码 |
代码r.EmbeddedCodeConfig |
Configuration parameters for C/C++ code generation fromMATLAB代码with嵌入式编码器 |
编码器 |
C/C ++代码生成的硬件特定配置参数MATLAB代码 |
代码r.hardware |
创造hardware board configuration object for C/C++ code generation fromMATLAB代码 |
编码器。替代类型 |
配置参数以指定自定义名称MATLABC/C ++代码生成中的内置数据类型 |
RTW.BuildInfo |
Provide information for compiling and linking generated code |
软件包
target |
管理目标硬件信息 |
Topics
Build Configuration Basics
- 配置构建设置
配置构建配置参数在命令行或MATLAB®CODER™应用程序。 - 构建过程自定义
控制代码生成后但在编译之前发生的构建过程的方面。 - 路径和文件基础架构设置
Specify location of custom code. - Share Build Configuration Settings
将项目设置导出到代码生成配置对象或将设置导入项目。 - 在命令行工作流中指定配置参数
Edit code generation configuration objects interactively. - C Compiler Considerations for Signed Integer Overflows
For accurate results from signed integer C operations, the C compiler must preserve wrap-on-overflow behavior. - 签名整数表示的要求
Compile generated code on a target that uses a two’s complement representation for signed integer values. - Build Process Support for Folder Names
Troubleshoot build process errors that occur when file system issues prevent file processing.
Specific Build Options
- 在生成的代码中保存可变名称
Improve readability of generated C/C++ code by preserving your variable names in the generated code. - How MATLAB Coder Partitions Generated Code
选择文件分区方法。 - 更改语言标准
For calls to math operations, the code generator uses the language standard that you specify in the build settings. - 指定生成代码中使用的数据类型
Generate built-in C types or MathWorks®预定义的类型。 - Register New Hardware Devices
Extend the range of supported hardware by registering new devices.
Troubleshooting
- 编译器和链接器错误
Address common causes of errors that occur during build.