C++ compiler flags

조회 수: 2 (최근 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 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