Is it possible to generate .o and .a files with Coder?

7 visualizaciones (últimos 30 días)
Doug McKenzie
Doug McKenzie el 10 de Ag. de 2015
Respondida: Ryan Livingston el 11 de Ag. de 2015
From what I can see Coder can generate mex files, plain C src, and .lib and .dll libraries. Is it possible to generate .o or .a libraries?

Respuestas (2)

Walter Roberson
Walter Roberson el 11 de Ag. de 2015
Yes. It probably already generates .o files but it might possibly be removing them if it builds the library correctly.
Which kind of library it builds will depend upon the compile flags you configure.

Ryan Livingston
Ryan Livingston el 11 de Ag. de 2015
You can use:
cfg = coder.config('lib');
codegen -config cfg ...
to generate a static library for your current platform or choose the "Static Library" option for the output type in the MATLAB Coder App.
On Linux and Mac this will be a .a file. On Windows, this will be a .lib file. As Walter says, on platforms where .o is the object file extension, those will be produced as intermediate output during compilation.

Categorías

Más información sobre Build Configuration 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!

Translated by