2021-01-22 08:23 AM
Hi everyone.
I'm writing a machine learning application for a master degree thesis.
I would like to work with C++ but, for some reason, when the Cube.AI software pack is included in the project, the compiler doesn't recognize C++ keyword, such as "class".
Does anyone know why this happen ?
2021-01-22 10:06 AM
By default projects created with STM32CubeMX (with or without X-CUBE-AI) are C projects.
You have to change the type of the project and the compiler to use in the IDE itself.
In STM32CubeIDE you can simply right click on the project and select "Convert to C++ project"
Regards
2021-01-22 11:29 AM
Hi @fauvarque.daniel, thanks for the answer.
I already knew that and I changed this option during the creation of the project by selecting c++ as target languages.
Furthemore, I already coded in C++ some other projects of mine, also starting from C as target language and then changing in c++ by that operation, without any problems.
I think that when there is the AI library in the project, it can work only in C, or that is what the problem seems.
In the building settings there are active gcc and g++ for all the steps of building, and the build command is
make -j7
(My apologies for bad English ).
Thanks.