빌드 구성
출력 파일 이름, 위치, 유형, 언어와 같은 빌드 설정 구성
이진 코드 생성을 위한 빌드 프로세스를 제어하고 구성하기 위한 많은 파라미터와 설정이 있습니다. 이러한 설정은 출력 빌드 유형(MEX, lib, dll 또는 exe)과 C 및 C++ 언어와 같은 특성을 제어합니다. 다른 빌드 설정을 사용하면 가독성, 성능, 외부 코드 통합 등의 특정 요구 사항에 따라 빌드 출력을 사용자 지정할 수 있습니다. 앱이나 명령줄에서 코드 생성 구성 객체의 빌드 옵션을 수정할 수 있습니다. coder.config
를 사용하여 구성 객체를 생성할 수 있습니다. open
을 사용하여 편집 앱에서 객체를 엽니다. 함수 코드 내부에서 추가 빌드 파일과 플래그를 지정하려면 coder.updateBuildInfo
를 사용하십시오.
함수
객체
coder.MexCodeConfig | Configuration parameters for MEX function generation from MATLAB code |
coder.CodeConfig | Configuration parameters for C/C++ code generation from MATLAB code |
coder.EmbeddedCodeConfig | Configuration parameters for C/C++ code generation from MATLAB code with Embedded Coder |
coder.HardwareImplementation | Hardware-specific configuration parameters for C/C++ code generation from MATLAB code |
coder.hardware | Create hardware board configuration object for C/C++ code generation from MATLAB code |
coder.ReplacementTypes | Configuration parameter to specify custom names for MATLAB built-in data types in C/C++ code generation (R2019b 이후) |
RTW.BuildInfo | Provide information for compiling and linking generated code |
클래스
coder.ExternalDependency | Interface to external code |
target.Alias | Create alternative identifier for target object |
target.CMake | Specify CMake installation for building generated code (R2022b 이후) |
target.CMakeBuilder | Configure how CMake builds generated code (R2022b 이후) |
target.CMakeBuildType | Describe CMake build type or build configuration (R2022b 이후) |
target.CMakeCacheEntry | Configure a CMake cache entry (R2022b 이후) |
target.EnvironmentConfiguration | Configure system environment for toolchain (R2022b 이후) |
target.HardwareComponentSupport | Describe support for a hardware component (R2022b 이후) |
target.LanguageImplementation | Provide C and C++ compiler implementation details |
target.Object | Base class for target types (R2019b 이후) |
target.Processor | Provide target processor information |
target.Toolchain | Capture high-level information about toolchain (R2022b 이후) |
네임스페이스
target | 타깃 하드웨어 및 빌드 툴 정보 관리 |
도움말 항목
빌드 구성 기본 사항
- Configure Build Settings
Configure build configuration parameters at the command line or in the MATLAB® Coder™ app. - Build Process Customization
Control aspects of the build process that occur after code generation but before compilation. - Paths and File Infrastructure Setup
Specify location of custom code. - Share Build Configuration Settings
Export project settings to a code generation configuration object or import the settings into a project. - Specify Configuration Parameters in Command-Line Workflow Interactively
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. - Requirements for Signed Integer Representation
Compile generated code on a target that uses a two’s complement representation for signed integer values. - Build Process Support for File and Folder Names
Troubleshoot build process errors that occur when file system issues prevent file processing.
특정 빌드 옵션
- Preserve Variable Names in Generated Code
Improve readability of generated C/C++ code by preserving your variable names in the generated code. - How MATLAB Coder Partitions Generated Code
Select file partitioning method. - Change Language Standard Used for Code Generation
The code generator uses the language standard that you specify in the build settings. - Specify Data Types Used in Generated Code
Generate built-in C types or MathWorks® predefined types. - Register New Hardware Devices
Extend the range of supported hardware by registering new devices. - Configure CMake Build Process
Specify CMake toolchain definition for building generated code. - Create Custom CMake Toolchain Definition
Capture high-level information about CMake-based toolchain and the target hardware it supports. - Constant Input Checking in MEX Functions
Control whether a MEX function checks the value of a constant input argument.
문제 해결하기
- 컴파일러 및 링커 오류
빌드 중에 발생하는 오류의 일반적인 원인을 해결합니다.