Hi Everyone,
I'm new to the method of compiling m files to dll's so they can be called by C/C++ programs. I'm having general issues with setting up the Matlab compiler–I'm using Matlab 2011b. Specifically:
1. On the Matlab command line, mbuild -setup, shows a list of two compilers; lcc-win32 C 2.4.1 and Microscoft Visual C++ 2010. Is lcc-win32 C 2.4.1 the same as Matlab Compiler 4.16? The reason is that I plan to install Matlab Compiler Runtime (MCR) 7.16 and I read that the Matlab version and the compiler have to be compatible (Matlab R2011b uses compiler 4.16 and thus MCR 7.16).
2. Please let me know of any special set-up settings for the compiler. Currently, I'm using the command: mcc -t -W lib:LinearFitModelFn_lib -L C -T link:lib -h libmwsglm.mlib libmmfile.mlib LinearFitModelFn.m
I'm able to compile an m file to a c, h, dll, and lib file with the lcc compiler but I receive the following readout:
The -t switch is no longer supported; the Compiler no longer generates C/C++ source code for MATLAB functions (it generates wrapper functions instead, see the documenation for -W).
The -L switch is no longer supported; the target (-T) and wrapper (-W) switches determine the language of the generated code.
The -h switch is no longer supported; the MATLAB Compiler detects MATLAB file dependencies automatically. But see also the documentation for the -a switch. The -t switch is no longer supported; the Compiler no longer generates C/C++ source code for MATLAB functions (it generates wrapper functions instead, see the documenation for -W).
The -L switch is no longer supported; the target (-T) and wrapper (-W) switches determine the language of the generated code.
The -h switch is no longer supported; the MATLAB Compiler detects MATLAB file dependencies automatically. But see also the documentation for the -a switch.
The statement about C source code is no longer generated but rather wrapper code is a bit confusing as a c file is generated. Is this the c wrapped code? Anyway, before I ask more questions, I should first have the compiler issue corrected.
Thank you for your support; I appreciate any insight into the questions above.
Best Answer