Can I generate C/C++ code which can be compiled for GCC compiler?

2 visualizaciones (últimos 30 días)
Surjya padhi
Surjya padhi el 26 de Jun. de 2012
hi geeks,
I am about to start a project. So need your help. Just need to know can we generate C/C++ code for a specific compiler like GCC with MATLAB Coder?
Or Is it possible to set my desired target compiler for my generated C/C++ code?

Respuestas (1)

Walter Roberson
Walter Roberson el 26 de Jun. de 2012
When you are using MATLAB Coder, there is (I have read) a field that allows you to control whether "C" or "C++" files are generated.
The generated files should be compilable by gcc or any standards-compliant compiler.
(I do not know at the moment which C standard revision is generated for; I do recall there have been a small number of questions about compilation problems that turned out to be because the compiler the user was attempting to use did not support some C89 standard constructs, so it could be that a C89 compliant compiler is enough.)
  1 comentario
Kaustubha Govind
Kaustubha Govind el 26 de Jun. de 2012
I believe the phrase that is officially used is "ANSI/ISO compliant C and C++" (http://www.mathworks.com/products/matlab-coder/description1.html).

Iniciar sesión para comentar.

Categorías

Más información sobre Embedded Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by