How to compile Windows generated codes with a platform-specific library on Linux machine?
이전 댓글 표시
I am using MATLAB R2020a to generated code from my Simulink Model. In order to use an external library in my code, I am using the
>> coder.updateBuildInfo('addLinkObjects', <libtest.lib>)
command in the MATLAB Function Block to link my Coder object with the target library. By doing so, my model can be compiled successfully on Windows.
As the next step, I want to compile the generated code on my Linux machine. I am following the workflow mentioned in this MATLAB Answer page:
But get an issue related to my specific use-case. The library <libtest.lib> I called in my code is platform-specific, which means it has a different version for Linux environment <libtest.a>. I have to use <libtest.lib> at first in order to successfully generate code on a Windows machine, but how can I let my code point to a different version of that library on Linux?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!