I’m using Geekfactory Shell Library (GitHub - geekfactory/Shell: GeekFactory Shell Library - Library to create a simple Command Line Interface (CLI)., PlatformIO Registry).
Its sources are in C file (Shell.c). And I’m getting the following errors when building my project:
In file included from C:\users\fgka\.platformio\packages\framework-arduinoststm32-maple\STM32F1\cores\maple/wirish.h:58:0,
from C:\users\fgka\.platformio\packages\framework-arduinoststm32-maple\STM32F1\cores\maple/Arduino.h:30,
from .pio\libdeps\sam_v1\GeekFactory Shell Library_ID1946\Shell.h:31,
from .pio\libdeps\sam_v1\GeekFactory Shell Library_ID1946\Shell.c:20:
C:\users\fgka\.platformio\packages\framework-arduinoststm32-maple\STM32F1\cores\maple/ext_interrupts.h:90:6: error: conflicting types for 'attachInterrupt'
void attachInterrupt(uint8 pin, voidArgumentFuncPtr handler, void *arg,
^~~~~~~~~~~~~~~
C:\users\fgka\.platformio\packages\framework-arduinoststm32-maple\STM32F1\cores\maple/ext_interrupts.h:69:6: note: previous declaration of 'attachInterrupt' was here
void attachInterrupt(uint8 pin, voidFuncPtr handler, ExtIntTriggerMode mode);
^~~~~~~~~~~~~~~
As you can see, the compiler does not understand function overloading in C mode.
If I rename the file to Shell.cpp
, the problem goes away.
Should I open an issue against the library, or the compiler can be forced to compile in CPP mode?