Hello together. I recently found out about platformio and switched to it because I copy all my code and header files into the arduino IDE which is a mess.
But sadly, with exactly the same code I get a ton of compiler errors in platformio but not a single one in the arduino IDE.
<artificial>:(.text.startup+0x2ba): undefined reference to `LEFT_SERVO'
<artificial>:(.text.startup+0x2bc): undefined reference to `LEFT_SERVO'
<artificial>:(.text.startup+0x2c6): undefined reference to `RIGHT_SERVO'
<artificial>:(.text.startup+0x2c8): undefined reference to `RIGHT_SERVO'
<artificial>:(.text.startup+0x2d2): undefined reference to `CENTER_SERVO'
<artificial>:(.text.startup+0x2d4): undefined reference to `CENTER_SERVO'
<artificial>:(.text.startup+0x2e2): undefined reference to `startUpRoutine()'
LEFT_SERVO, RIGHT_SERVO and CENTER_SERVO are defined in the servo_drive files:
.h file:
extern Servo LEFT_SERVO;
extern Servo RIGHT_SERVO;
extern Servo CENTER_SERVO;
.cpp file:
Servo LEFT_SERVO;
Servo RIGHT_SERVO;
Servo CENTER_SERVO;
startUpRoutine() is declared like this in my .h file:
void startUpRoutine();
and in my cpp file there is the whole function.
Where is the error? Why does it work in Arduino IDE?