Skip to main content
Graduate
December 22, 2025
Solved

CubeMX code generation switches project from C++ to C causing build and linker errors

  • December 22, 2025
  • 1 reply
  • 460 views

My projects are all in C++ and were building completely fine. After I generated the code from CubeMX, the language switched back to C. I had to go and manually switch to C++, then it gave me build errors with linker script... Please fix!

Best answer by Souhaib MAZHOUD

Hello @spaceDog16 

Actually, this issue has been solved in the latest version of CubeMX 6.16.1, I suggest that you update your version of CubeMX and recheck.

BR, Souhaib

1 reply

Souhaib MAZHOUDBest answer
Technical Moderator
December 22, 2025

Hello @spaceDog16 

Actually, this issue has been solved in the latest version of CubeMX 6.16.1, I suggest that you update your version of CubeMX and recheck.

BR, Souhaib

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.