Symbol mexFunction Unresolved or Not Defined

Attempting to compile a MEX function that does not include a gateway function generates errors about the mexFunction symbol. For example, using a C/C++ compiler, MATLAB® displays information like:

LINK : error LNK2001: unresolved external symbol mexFunction

Using a Fortran compiler, MATLAB displays information like:

unresolved external symbol _MEXFUNCTION

On macOS platforms, MATLAB displays information like:

Undefined symbols for architecture x86_64: 
"_mexfunction_", referenced from: 
-exported_symbol[s_list] command line option 

Related Topics