I'm learning to mex Fortran files and am having trouble with the timestwo.F tutorial. I'm able to compile and run the built-in, fixed format example file without a problem. However, when I tried to compile my own free format file named timestwo.f90, I got a bunch of errors about invalid preprocessor directives. From a MATLAB Answers question, I found that I needed to capitalize the f in the file extension. mex timestwo.F90 completes successfully. When I try to use the function, though, I get an error:
Invalid MEX-file '/home/user/Documents/MATLAB/mex/timestwo.mexa64': /home/user/Documents/MATLAB/mex/timestwo.mexa64: undefined
The only difference between my file and the example file is that mine is free format and doesn't include the #if MX_HAS_INTERLEAVED_COMPLEX check found in the example file. Is this an issue with support for free format source?