C++ compiler flags

4 ビュー (過去 30 日間)
Damien Joubert
Damien Joubert 2021 年 8 月 4 日
回答済み: Akshat Dalal 2025 年 5 月 12 日
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 Center および File ExchangeCall 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