Main Content

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 reserved keywords that the code generator cannot rename, 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

assertexternsetjmpstring
autofenvshortstruct
breakfloatsignalswitch
caseforsignedtgmath
chargotosizeofthreads
constifstatictime
complexintstdaligntypedef
continueinttypesstdarguchar
ctypeiso646stdatomicunion
defaultlimitsstdboolunsigned
dolocalestddefvoid
doublelongstdintvolatile
elsemathstdiowchar
enumregisterstdlibwctype
errnoreturnstdnoreturnwhile

C++ Reserved Keywords

algorithmcstddefiostreamsstream
anycstdintistreamstack
arraycstdioiteratorstatic_cast
atomiccstdliblimitsstdexcept
bitsetcstringliststreambuf
cassertctgmathlocalestring_view
catchctimemapstrstream
ccomplexcucharmemorysystem_error
cctypecwcharmemory_resourcetemplate
cerrnocwctypemutablethis
cfenvdeletemutexthread
cfloatdequenamespacethrow
chronodynamic_castnewtry
cinttypesexceptionnumerictuple
ciso646executionoperatortypeid
classexplicitoptionaltype_traits
climitsexportostreamtypeindex
clocalefilesystemprivatetypeinfo
cmathforeward_listprotectedtypename
codecvtfriendpublicunordered_map
complexfstreamqueueunordered_set
condition_variablefunctionalrandomusing
const_castfutureratioutility
csetjmpinitializer_listregexvalarray
csignalinlinereinterpret_castvector
cstdaligniomanipscoped_allocatorvirtual
cstdargiossetwchar_t
cstdbooliosfwdshared_mutex 

Reserved Keywords for Code Generation

absfortranlocalZCErtNaN
asmHAVESTDIOlocalZCSVSeedFileBuffer
boolid_tmatrixSeedFileBufferLen
boolean_Tint_TMODELsingle
byte_T int8_TMTTID01EQ
char_Tint16_TNCSTATEStime_T
cint8_Tint32_TNULLtrue
cint16_Tint64_TNUMSTTRUE
cint32_TINTEGER_CODEpointer_Tuint_T
creal_TLINK_DATA_BUFFER_SIZEPROFILING_ENABLED uint8_T
creal32_TLINK_DATA_STREAMPROFILING_NUM_SAMPLESuint16_T
creal64_TlocalBreal_Tuint32_T
cuint8_TlocalCreal32_Tuint64_T
cuint16_TlocalDWorkreal64_TUNUSED_PARAMETER
cuint32_TlocalPRTUSE_RTMODEL
ERTlocalXRT_MALLOC VCAST_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