How to compile Windows generated codes with a platform-specific library on Linux machine?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!