Main Content

Speed Up Compilation by Generating Only Code

To speed up compilation, you can generate only code. When you generate only code, MATLAB® Coder™ does not invoke the make command or generate compiled object code. When you iterate between modifying MATLAB code and generating C/C++ code, and you want to inspect the generated code, using this option saves time.

To select this option in the MATLAB Coder app:

  1. On the Generate Code page, click the Generate arrow to open the Generate dialog box.

  2. Set Build Type to Static Library, Dynamic Library, or Executable.

  3. Select the Generate code only check box.

To set this option at the command line, use the codegen -c option. For example, to generate only code for a function foo:

codegen -c foo

See Also

Related Topics