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

3 次查看(过去 30 天)
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?

采纳的回答

Ryan Livingston
Ryan Livingston 2022-8-3
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Coder 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by