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

조회 수: 7 (최근 30일)
Doug McKenzie
Doug McKenzie 2015년 8월 10일
답변: Ryan Livingston 2015년 8월 11일
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?

답변 (2개)

Walter Roberson
Walter Roberson 2015년 8월 11일
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 2015년 8월 11일
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.

카테고리

Help CenterFile Exchange에서 Build Configuration에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by