Changing Output Type

MEX functions use a different set of configuration parameters than libraries and executables use. When you switch the output type between MEX Function and Source Code, Static Library, Dynamic Library, or C/C++ Executable, verify these settings.

If you enable any of the following parameters when the output type is MEX Function, and you want to use the same setting for C/C++ code generation as well, you must enable it again for C/C++ Static Library, C/C++ Dynamic Library, and C/C++ Executable.

Project Settings

Project Settings Dialog Box TabParameter Name
PathsWorking folder
Build folder
Search paths
SpeedSaturate on integer overflow
MemoryEnable variable-sizing
Dynamic memory allocation
Stack usage max
Code AppearanceGenerated file partitioning method
Include comments
MATLAB source code as comments
Reserved names
DebuggingAlways create a report
Automatically launch a report if one is generated
Custom CodeSource file
Header file
Initialize function
Terminate function
Additional include directories
Additional source files
Additional libraries
Post-code-generation command
AdvancedConstant folding timeout
Language
Inline threshold
Inline threshold max
Inline stack limit
Use memcpy for vector assignment
Memcpy threshold (bytes)
Use memset to initialize floats and doubles to 0.0

Configuration Object Parameters

  • ConstantFoldingTimeout

  • CustomHeaderCode

  • CustomInclude

  • CustomInitializer

  • CustomLibrary

  • CustomSource

  • CustomSourceCode

  • CustomTerminator

  • DynamicMemoryAllocation

  • EnableMemcpy

  • EnableVariableSizing

  • FilePartitionMethod

  • GenCodeOnly

  • GenerateComments

  • GenerateReport

  • InitFltsAndDblsToZero

  • InlineStackLimit

  • InlineThreshold

  • InlineThresholdMax

  • LaunchReport

  • MATLABSourceComments

  • MemcpyThreshold

  • PostCodeGenCommand

  • ReservedNameArray

  • SaturateOnIntegerOverflow

  • StackUsageMax

  • TargetLang