cancel
Showing results for 
Search instead for 
Did you mean: 

Does cubemx support generating main.cpp in cmake project?

Raya
Associate

When I use cubeide, it is OK to select c++ as targeted language. However, I can not find such a option in cubemx. Does cubemx support to generate c++ project with cmake? If not, could it be supported in the future?

Raya_1-1753435456822.png

 

1 REPLY 1
TDK
Super User

CubeMX generates C code. There is no way to make it generate C++ code.

You can use C++ in your project by creating a different *.cpp file and calling a function in there from main().

If you feel a post has answered your question, please click "Accept as Solution".