I am developing a ML system based on Cortex-M4 in C language and combined tensorflow packages (https://github.com/tensorflow/tflite-micro) to my C project.
This package is writen in C++11. So, I use ARM Compiler V6.14 to build my C project.
Becuase Tensorflow package was writen in CC File not Cpp file so that Keil seems to reocognize CC file as C file, and it led to compiling error. So, I tried to converted all CC file in Tensorflow Packages to Cpp file, and Keil finally could build all of the Tensorflow Packages files in my project.
I want to know is there any way to let Keil MDK v5.37 recognize CC file as Cpp file? And I don't need to manually convert all CC file to Cpp File.
Thanks for your help!
I see '-xc- in the above `C/C++ (AC6)` screenshot, in the Compiler control string.Can you add `-xc++` into the Misc Controls section, which should over-ride that, as it would be added after -xc on the command line (the latter specified option takes preference).
Now, there is another problem while compiling C file.
=> error: invalid argument '-std=c99' not allowed with 'C++'
Should I change the Language C option?
I tried to select Language C option as <default>.
It seems that CC file could be compiled as C++, but it made influence and throw warning and error to some C file in my project (I guess that is caused by different syntax becasue now the whole project is treating as C++ project?).
[Update]
I found a solution that we can set the target CC files as C++ file, and then the compiler is able to treat the CC files as C++ file and compile with C++ default settings.