I have a C file that is compiled for both a console application and a MATLAB MEX file. I wish to exclude some parts of the code when compiled for MEX. Is there a definition I can check during MEX compilation?
I have a C file that is compiled for both a console application and
Share
Mex files are required to have the preprocessor symbol
MATLAB_MEX_FILEdefined.