Loading...
 
Skip to main content

System Workbench for STM32


STM32CubeMX for SW4STM32 : where is c++ compiler ?


Hi Everyone,

I also have same issue! After adding my C++ code to the project, and convert the project to C++, I tried to build the code, but I received "Unknown type name 'class'" which means the compiler didn't recognize my c++ code! Has any one found a solution to resolve this issue? I really would like to be able to run C++ code on my STM32 mcu.

Thank you.

France

Hi,

What extension do you use for your C++ code; on Windows, as file names are case insensitive, you must use .cpp instead of .c or .C for the C++ compiler to be called; a C++ project may include both C and C++ code but will be linked as a C++ program, using the C++ linker.

HTH

Bernard (Ac6)