Documentation Center

  • Trial Software
  • Product Updates

File Infrastructure and Paths Setup

Compile Path Search Order

fiaccel resolves function calls by searching first on the code generation path and then on the MATLAB® path. By default, fiaccel tries to compile and generate code for functions it finds on the path unless you explicitly declare the function to be extrinsic. An extrinsic function is a function on the MATLAB path that is dispatched to MATLAB software for execution. fiaccel does not compile extrinsic functions, but rather dispatches them to MATLAB for execution.

Naming Conventions

MATLAB enforces naming conventions for functions and generated files.

Reserved Prefixes

MATLAB reserves the prefix eml for global C functions and variables in generated code. For example, run-time library function names all begin with the prefix emlrt, such as emlrtCallMATLAB. To avoid naming conflicts, do not name C functions or primary MATLAB functions with the prefix eml.

Reserved Keywords

MATLAB Coder™ software reserves certain words for its own use as keywords of the generated code language. MATLAB Coder keywords are reserved for use internal to MATLAB Coder software and should not be used in MATLAB code as identifiers or function names. C reserved keywords should also not be used in MATLAB code as identifiers or function names. If your MATLAB code contains any reserved keywords, the code generation build does not complete and an error message is displayed. To address this error, modify your code to use identifiers or names that are not reserved.

If you are generating C++ code using the MATLAB Coder software, in addition, your MATLAB code must not contain the C++ Reserved Keywords.

C Reserved Keywords.  

autodoubleintstruct
breakelselongswitch
caseenumregistertypedef
charexternreturnunion
constfloatshortunsigned
continueforsignedvoid
defaultgotosizeofvolatile
doifstaticwhile

C++ Reserved Keywords.  

catchfriendprotectedtry
classinlinepublictypeid
const_castmutablereinterpret_casttypename
deletenamespacestatic_castusing
dynamic_castnewtemplatevirtual
explicitoperatorthiswchar_t
exportprivatethrow 

Reserved Keywords for Code Generation.  

absfortranlocalZCErtNaN
asmHAVESTDIOlocalZCSVSeedFileBuffer
boolid_tmatrixSeedFileBufferLen
boolean_Tint_TMODELsingle
byte_Tint8_TMTTID01EQ
char_Tint16_TNCSTATEStime_T
cint8_Tint32_TNULLtrue
cint16_Tint64_TNUMSTTRUE
cint32_TINTEGER_CODEpointer_Tuint_T
creal_TLINK_DATA_BUFFER_SIZEPROFILING_ENABLEDuint8_T
creal32_TLINK_DATA_STREAMPROFILING_NUM_SAMPLESuint16_T
creal64_TlocalBreal_Tuint32_T
cuint8_TlocalCreal32_Tuint64_T
cuint16_TlocalDWorkreal64_TUNUSED_PARAMETER
cuint32_TlocalPRTUSE_RTMODEL
ERTlocalXRT_MALLOCVCAST_FLUSH_DATA
falselocalXdisrtInfvector
FALSElocalXdotrtMinusInf 

Conventions for Naming Generated files

MATLAB provides platform-specific extensions for MEX files.

PlatformMEX File Extension
Linux® x86-64.mexa64
Windows® (32-bit).mexw32
Windows x64.mexw64

Was this topic helpful?