Add 'lib' prefix to libraries generated with MATLAB Code Generator

4 vues (au cours des 30 derniers jours)
Devin
Devin le 27 Juil 2022
Commenté : Devin le 3 Août 2022
I've generated some C++ code from some MATLAB code that I have on my Mac. I'm using the DLL option to generate a shared library. However the shared libraries I've generated have names like "mylibrary.dylib" and my compiler expects "libmylibrary.dylib". Is there any way to tell MATLAB to add in the "lib" prefix?

Réponse acceptée

Ryan Livingston
Ryan Livingston le 3 Août 2022
You can use the -o argument to codegen to rename the library:
codegen somecode -args 1 -o libmylibrary
In the Coder App the "Output file name" setting controls this
  1 commentaire
Devin
Devin le 3 Août 2022
This worked, thanks! I'm using the command line interface so I guess it was a little less obvious.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by