Incorrect and incomplete documentation for mcc in R2012a

3 views (last 30 days)
Hello, I'm trying to generate the C/C++ code that mcc generates for creating standalone applications (so I can insert a statement into that code to obtain more info on an error that is happening). According to the help, this should be possible. I use R2012a. I quote from help mcc:
Generate wrapper files in C or C++ and optionally build standalone binary files. [...] OPTIONS: [...]
-c C only. Generate C wrapper code. This is equivalent to "-T codegen" as the rightmost argument on the command line.
Okay, so I do:
mcc -c -W main myFile.m
I get:
Error: The wrapper type specified with -W switch doesn't match with the target type specified with -T switch.
But I didn't specify any -T switch? And the documentation says that using -c is equivalent to using -T codegen? But alright, so I check the help for -T:
-T option Specify target phase and type. The following table shows valid option strings and their effects: codegen [...]
I only want to generate code, not compile it yet, so I do:
mcc -c -W main -T codegen myFile.m
I get:
Error: "codegen" is not a valid -T option argument.
Mmkay. That's not what the documentation says.
I get no errors when I replace -T codegen with -T compile:exe, or when I replace the -W and -T options with -m, but then all it generates is a CTF archive with .m files but no C files. Same behavior happens for R2011b.
Can somebody confirm if the documentation is incorrect or if I'm doing something wrong? If the former, how can I achieve what I want? Perhaps use the codegen command to generate the C code, but will this generate the same C code that is the source of the standalone app generated if using mcc -m? (I'm doing this for debugging, so I'd like the two versions to be the same).
Thanks.

Answers (0)

Categories

Find more on Standalone Applications in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!