Converting to C++
How did you do the conversion ? (did you use option 1, below)
1) In Project Explorer right-click on project and then from contex menu choose “Convert to C++” option.
2) Change .project file:
to convert a C project to a C++ project, simply add: org.eclipse.cdt.core.ccnature
just below the line org.eclipse.cdt.core.cnature to the .project file generated by STM32CubeMX.
Let the generated files with the .c extension.
Add your files with the extension .cpp if you write C++ code.
Check the build output, for .cpp files should be invoked g++ compiler and for .c files gcc compiler
I did not try any of above on System Workbench, so I don’t know if works. I used second option on TrueStudio.