coder.EmbeddedCodeConfig: CustomSourceCode: How to specify multiple lines of code.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Using the CustomSourceCode property of the coder.EmbeddedCodeConfig class, you can add code to be inserted in the generated code. I use it to have a file included into my source code.
Now I want to include multiple files, and so I need to specify multiple lines or custom source code.
How can I specify multiple lines of source code in CustomSourceCode ?
I tried:
cfg.CustomSourceCode = '#include "file1.h"\n#include "file2.h"'
but that just results in
#include "file1.h"\n#include "file2.h"
in my source file, which doesn't compile.
3 comentarios
Respuesta aceptada
TAB
el 13 de Ag. de 2012
cfg.CustomSourceCode = sprintf('%s\n\r%s',...
'#include "file1.h"','#include "file2.h"');
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!