To simplify debugging this issue I wrote a very small program:
#include "mex.h"
#include "engine.h"
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
Engine *ep;
printf("MEX!\n");
engEvalString(ep,"disp(\'done\')");
}
If the engEvalString line is commented out, the program compiles and runs as expected. As soon as engEvalString is added back in, I get the same error:
Error using mex
Creating library mex_engTest.lib and object mex_engTest.exp
mex_engTest.obj : error LNK2019: unresolved external symbol engEvalString referenced in function
mexFunction
mex_engTest.mexw64 : fatal error LNK1120: 1 unresolved externals
