freertos with c++ library in cubeide
Hi, I'm new to building by using CubeIDE
Actaully, I'm kind of lost for building my project.
When applying freeRTOS provided by CUBEIDE, a freertos.c file is generated. I want to use including a C++ header file and C++source code and using a C++ class created in the C++ source code in my freertos.c file. I changed the targeted language to C++ and renaming main.c to main.cpp. Then, if I use #include "myown.h" (based by c++) and
extern "C" MX_FREERTOS_Init(); in prototype.
And when I bulid, warning appears
" ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
at freertos.cpp."
osThreadDef(AGLORITHM, Algorithm, osPriorityAboveNormal, 0, 128);
warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
osThreadDef(AGLORITHM, Algorithm, osPriorityAboveNormal, 0, 128);
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.h:416:4: note: in definition of macro 'osThreadDef'
416 | { #name, (thread), (priority), (instances), (stacksz), NULL, NULL }
| ^~~~
What should I do for this ?
