What files are generated when I compile an MATLAB file using mcc with -m flag?

1 view (last 30 days)
I get different results when I compile using the -m macro switch and using the 'equivalent' options listed in the manual.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Feb 2010
As mentioned in the documentation, the -m macro is equivalent to:
-t -W main -L C -T link:exe -h libmmfile.mlib
where,
-t means translate to a target language (can be C or C++)
-W main means create a main wrapper function
-L C specifies the target language to be C (can also be Cpp to mean C++)
-T link:exe specifies the building stage and final type (in this case link to an executable)
-h means to automatically find, and compile helper functions included in the source MATLAB file
libmmfile.mlib specifies all MATLAB files that are built into the libmmfile shared library
With either the -m macro or the above-mentioned set of flags, the files that are generated will be:
1. A '.c' and a '.h' file for each of the MATLAB files that are called directly or indirectly in your code
2. One "main" wrapper function
3. One executable file (.exe)

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!