When a program that depends on MEX file is compiled as a stand-alone, an AUTH file is generated for the MEX file. If the user does not include the MEX file during compilation, this AUTH file will not be generated.
Thus, even if the stand-alone application can locate the MEX file at runtime, it does not have the appropriate AUTH file to execute it. So it is not possible to call an external MEX function from a compiled stand-alone application.
Best Answer