The steps for compiling the MEX function are documented in the User Guide for the core C-Models. This Answer Record is to provide more details on where to obtain information about the compilers that are compatible with MATLAB, and how to set it up with MATLAB in order to compile the MEX function.
MATLAB supports various compilers, and a complete list for the latest release of MATLAB can be found at:
If you want a list for a different version of MATLAB, please search the MathWorks website.
Most Linux distributions come with a GCC (Free) compiler installed. This can be used with MATLAB to compile the MEX function provided.
Here is an example, you start with the command line and make sure you can compile.
>m1 -64 14.2
>setenv LD_LIBRARY_PATH .:$LD_LIBRARY_PATH
>gcc run_bitacc_cmodel.c -o run_bitacc_cmodel -I. -L. -lgmp -lIp_fir_compiler_v6_3_bitacc_cmodel
Then you launch Matlab and setup the compiler and run the provided scripts:
It is recommended that you use Visual Studio (Visual C++) or Visual C++ Express Edition (Free) from Microsoft. MathWorks provides more information on these compilers from their list of supported compilers above.