Same thing for line 317, 400 and 406.
I feels like i searched the whole interent for a solution but all I could find was this: Compile Error using g++ - FreeRTOS
I already tried to enforce C-files compiling with GNU C, but this didn’t help.
What makes this even stranger for me is the fact, that when I create a test project which compiles without any errors and copy heap_4.c from the test project, I still get errors.
The error says that either you have some over-restrictive setting for the C compiler (that makes it non-conforming) or you are compiling the file as a C++ file, likely the latter.
One quick test would be to add some C++ only code to the file and see if it is accepted, maybe something like:
class test {
int a;
};
If that doesn’t give an error, then you know it is being compiled as C++.
I don’t have CubeIDE loaded at the moment, but you should check if there is a file extension to file type mapping setup somewhere. It might be in the project settings, or it might run off the IDE settings (Window / Preferences / File Types)
*.c files are already mapped as C Source Files in the IDE settings and I have also mapped C Source Files with GNU C but I still have this problem.
I guess I have to search for an alternative…
I think the compiler used in platform.io is going to be the same - you are still going to need to work out how to build the c files as c and the C++ files as C++.