In mixed C/C++ application CubeIDE does not find cstdint include file in C++ file
I created a fresh C++ project and copied over some existing C files from another project. I then renamed them to .cpp and started porting them. First I renamed the system include files from foo.h to cfoo. With this, CubeIDE complains about cstdint not being found. It compiles the file with gcc -std=gnu11 instead of -std=gnu++14.
I tried setting the C Compiler to g++ but then CubeIDE chokes on C files using C++ keywords as identifiers.
I also tried renaming my own header files to .hpp (because the error occurs in the header file) but the error message remained the same.
error: cstdint: No such file or directory foo.hppHow can I tell CubeIDE to compile the file with the correct compiler?