January 11, 2019
Install MinGW-w64 from TDM-GCC MinGW Compiler. (download TDM-GCC)
Need to install TDM-GCC MinGW Compiler in a location is not spaces in the path.
Recommend: install in C:\TDM-GCC-64.
Open command windows in MATLAB for setup environment.
2.1 Run command :
> setenv("MW_MINGW64_LOC", "path")
e.g. setenv(“MWMINGW64LOC”, “C:\TDM-GCC-64”)
> mex -setup
2.2 Click mex -setup C++ (select language that you want to compile)
Now, You can compile c langauage program. Run command :
> mex filename.c