C++ Project for System Workbench
I had the same problem: my cpp files were not compiled.
I found that the file was not compiled because while importing c++ files, the compiler is not automatically set as it is for C files.
To correct this, you have to select your cpp file in the project explorer, right click -> Properties -> C/C++ build -> Tool chain Editor -> Select tool
Here select “MCU G++ Compiler” instead of “NO TOOL”
Once done, on my side, the workbench now tries to compile the file but I have no compilation errors:
cc1plus: error: invalid option `thumb’
cc1plus: error: invalid option `float-abi=soft’
myfile.cpp:1: warning: -ffunction-sections may affect debugging on some targets
and I don’t know yet why?