C++ compiler flags

2 vues (au cours des 30 derniers jours)
Damien Joubert
Damien Joubert le 4 Août 2021
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.

Réponses (1)

Akshat Dalal
Akshat Dalal le 12 Mai 2025
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

Catégories

En savoir plus sur Call C++ from MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by