C++ compiler flags

2 次查看(过去 30 天)
Damien Joubert
Damien Joubert 2021-8-4
In clibgen.generateLibraryDefinition(...), how do I specify the flags for the compiler?
In my case, I'd just like to change the c++ version.
Thank you.

回答(1 个)

Akshat Dalal
Akshat Dalal 2025-5-12
Hi Damien,
You can specify the C++ version using the "AdditionalCompilerFlags" argument as shown below:
clibgen.generateLibraryDefinition("A.hpp","AdditionalCompilerFlags","-std=c++20")
You can find more information about this under the "AdditionalCompilerFlags" section in the clibgen.generateLibraryDefinition documentation: https://www.mathworks.com/help/matlab/ref/clibgen.generatelibrarydefinition.html

类别

Help CenterFile Exchange 中查找有关 Call C++ from MATLAB 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by