Binaries and executables can be created from the app, or from the command line. Generate deployable code with an example main function to incorporate the executable or binary into your application. Supporting initialization and cleanup functions are also generated for your use. Depending on the types of arrays you want to integrate into your packaged code, see the relevant pages below.
Fundamental considerations for creating working binaries from generated code.
Choose CMake or toolchain approach for building generated code.
Generate C/C++ executables at the command line or in the MATLAB® Coder™ app.
MATLAB Coder generates an example main function that helps you to incorporate generated C code into your application.
Examine the parts of a generated example main function so that you can modify an example main for your application.
Use supporting functions to perform initialization and cleanup operations.
Understand and use arrays from the generated function interfaces
Understand and use dynamically allocated arrays from the generated C++ function interfaces.
Package generated files into a compressed file that you can relocate and unpack with a standard zip utility.