2023-10-13 05:00 AM - edited 2023-10-13 05:50 AM
When the project configurator will forever just generate a main.c and then never compile because 'class' type is not defined...
Seriously STE... take a hint from this and below: Your IDE is bad and you should feel bad. You have a UX, documentation, and UI problem here.
https://community.st.com/t5/stm32cubeide-mcus/c-with-stm32cubeide/m-p/586876
https://community.st.com/t5/stm32cubeide-mcus/how-to-generate-main-cpp-with-stm32cubeide/m-p/157101
https://community.st.com/t5/stm32cubeide-mcus/c-project-on-stm32cubeide/m-p/223182
2023-10-13 12:45 PM
I realize this post is more a rant than a question seeking a solution, but the point of the element is to include the C++ compiler in the project. Files still need to be named appropriately for it to be treated as a C++ file. If that's not checked, and you have *.cpp files in your project, it won't know what to do with them.
2023-10-23 06:35 AM
Hello @capnhyaku
First let me thank you for posting.
The STM32CubeMX (the code generator) does not generate C++ code it only generate C code.
However, like @TDK have mentioned, the this check box is used to include C++ compiler in the project in case your project will contain C++ code.
For example, if you are planning to use TouchGFX for graphics you need to check this box as TouchGFX will generate C++ code.
BR,
Semer.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.