MATLAB COMPILER RELEASE NOTES Guía de usuario Pagina 152

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 151
5 Controlling Code Generation
5-36
No Annotation
To include no source from the initial M-file in the generated output, use
mcc -A annotation:none …
Thiscode snippetshowsthe generatedcode withoutcommentsand sourcecode.
static void Mhello(void) {
mxArray * ans = mclGetUninitializedArray();
mclAssignAns(
&ans,
mlfNFprintf(0, mlfScalar(1), mxCreateString("Hello, World\\n"), NULL));
mxDestroyArray(ans);
}
.
.
.
Controlling #line Directives in Output Code
#line preprocessing directives inform a C/C++ compiler that the C/C++ code
was generated by another tool (MATLAB Compiler) and they identify the
correspondence between the generated code and the original source code
(M-file). You can use the
#line directives to help debug your M-file(s). Most C
languagedebuggers candisplayyourM-filesourcecode.Thesedebuggersallow
you to set breakpoints, single step, and so on at the M-file code level when you
use the
#line directives.
Use the
line:setting option to include #line preprocessor directives in your
generated C or C++ output. The possible values for
setting are:
on
off
Not specifying any line setting uses the default of off, which does not include
any
#line preprocessor directives in the generated C/C++ source.
Note When using the #line directive, the page-width directive is disabled in
order to make the code work properly with the C debugger.
Vista de pagina 151
1 2 ... 147 148 149 150 151 152 153 154 155 156 157 ... 263 264

Comentarios a estos manuales

Sin comentarios