Associate III
May 28, 2020
Question
Errors while trying to port a C++ library
- May 28, 2020
- 1 reply
- 753 views
I'm trying to import an Arduino C++ library into an STM32F4 project. I set the project to be a C++ one while I was creating it. I've also made the necessary code changes needed for the STM32. However, while compiling I'm getting the following errors. Can anyone please let me know how I can resolve this? I've also attached the library files here.
In file included from ../Core/Src/main.c:27:0:
../Core/Inc/PID_V1.h:5:1: error: unknown type name 'class'
class PID {
^~~~~
../Core/Inc/PID_V1.h:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
class PID {
^
make: *** [Core/Src/subdir.mk:47: Core/Src/main.o] Error 1
make: *** Waiting for unfinished jobs....
"make -j4 all" terminated with exit code 2. Build might be incomplete.
11:05:41 Build Failed. 4 errors, 0 warnings. (took 6s.826ms)