“File is not a mex file” error despite the settings seeming correct
I am trying to follow the Matlab examples on using mex. I first run
copyfile(fullfile(matlabroot,"extern","examples","mex","yprime.c"),".","f")
and this works, copying the file. I then run
mex yprime.c
which gives me the output
Building with ‘MinGW64 Compiler (C)’.
Error using mex
‘yprime.mexw64’ is not a MEX file. For more information, see File is not a MEX file.
I have ensured that I am using the correct version of the compiler (6.3.0). I am using a 64-bit operating system with 64-bit MATLAB, and running
mexext
returns mexw64 as expected. So I am not sure what the issue could be. I have looked in the "see File is not a MEX file" section of the help and it did not help me resolve the issue.I am trying to follow the Matlab examples on using mex. I first run
copyfile(fullfile(matlabroot,"extern","examples","mex","yprime.c"),".","f")
and this works, copying the file. I then run
mex yprime.c
which gives me the output
Building with ‘MinGW64 Compiler (C)’.
Error using mex
‘yprime.mexw64’ is not a MEX file. For more information, see File is not a MEX file.
I have ensured that I am using the correct version of the compiler (6.3.0). I am using a 64-bit operating system with 64-bit MATLAB, and running
mexext
returns mexw64 as expected. So I am not sure what the issue could be. I have looked in the "see File is not a MEX file" section of the help and it did not help me resolve the issue. I am trying to follow the Matlab examples on using mex. I first run
copyfile(fullfile(matlabroot,"extern","examples","mex","yprime.c"),".","f")
and this works, copying the file. I then run
mex yprime.c
which gives me the output
Building with ‘MinGW64 Compiler (C)’.
Error using mex
‘yprime.mexw64’ is not a MEX file. For more information, see File is not a MEX file.
I have ensured that I am using the correct version of the compiler (6.3.0). I am using a 64-bit operating system with 64-bit MATLAB, and running
mexext
returns mexw64 as expected. So I am not sure what the issue could be. I have looked in the "see File is not a MEX file" section of the help and it did not help me resolve the issue. mex, compiler MATLAB Answers — New Questions