I am using MEX with the '-D' flag to define the constant ELEMENT_OPERATOR and would like to define this constant to be *. When compiling a C++ mex file, I run the following command:
mex mexfun.cc -DELEMENT_TYPE=int64 -DELEMENT_OPERATOR=* -output times -v
but MATLAB errors out with the following message:
fatal error C1189: #error : ELEMENT_OPERATOR must be defined !
However, replacing '*' with '+' works fine.
Best Answer