Does legacy code include static libraries?

조회 수: 3 (최근 30일)
Borja Heriz
Borja Heriz 2022년 5월 11일
답변: Borja Heriz 2022년 5월 23일
Hi there,
I have some own code in Visual Studio from which I've generated static libraries (*.lib).
Now, I want to use in Simulink. So, I've successfully created an S-Function using the legacy_code tool and declaring my static libraries both as "HostLibFiles" and "TargetLibFiles".
Now, I want to share this S-Function with others, but I have a couple of questions:
  • Shall I need to relese also the lib files togheter with the S-Function for simulation purposes? I think that this isn't needed because the *.mexw64 file created already include the libraries, isn't it?
  • I think that this is needed in case the user wants to generate code from the S-Function, right?
Many thanks in advanced,
Borja

답변 (2개)

Mark McBroom
Mark McBroom 2022년 5월 21일
  1. You are correct that the static library is not needed for simulation because it is already linked into the mexw64 file.
  2. In order to support code generation, you will need to provide the .lib and the associated header file to your users.

Borja Heriz
Borja Heriz 2022년 5월 23일
Hi Mark,
Many thanks for having clarified this to me.
Borja

카테고리

Help CenterFile Exchange에서 Code Generation for Custom Blocks에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by