Hi Tatsuya,
I do not speak Japanese, so I am answering in English. So, I apologize in advances for any unintended tone or misinterpretation.
I was able to generate Mex files from C-code without the warning you mentioned. You could try updating MATLAB R2017b and the “MATLAB Support for MinGW-w64 C/C++ Compiler” feature to the latest versions. Here are the versions I used:
- MATLAB Version: 9.3.0.713579 (R2017b)
- MATLAB Support for MinGW-w64 C/C++ Compiler (Version 17.2.0)
After that, you could make sure that the “mex” command is actually using the installed MinGW by executing “mex -setup”. The output should look similar to this:
After confirming that the correct compiler is being used, execute the following command to generate Mex with OpenMP support:
mex file_name.c COMPFLAGS="/openmp $COMPFLAGS"
Also, make sure that the path to your C file does not contain any blank spaces, as this could cause problems during compilation.
Happy to help.