C++ compiler flags
    3 views (last 30 days)
  
       Show older comments
    
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. 
0 Comments
Answers (1)
  Akshat Dalal
      
 on 12 May 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
0 Comments
See Also
Categories
				Find more on Call C++ from MATLAB in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
