src/main.cpp:455:21: error: 'class TelnetSpy' has no member named 'setCallbackOnConnect'
src/main.cpp:456:21: error: 'class TelnetSpy' has no member named 'setCallbackOnDisconnect'
However I see this in the TelnetSpy.h file:
void setCallbackOnConnect(void (*callback)());
void setCallbackOnDisconnect(void (*callback)());
Those lines are in the public section of the class.
The program is working fine in Arduino IDE. I’m just trying to get some experience with PlatformIO.
As a note, I had included the library in the platformio.ini file but when I got that message I went ahead and removed it and downloaded the source into my lib directory so if for some reason I was loading a different library I’d know for sure I was using the right one. It’s no longer defined in the platformio.ini file.
The author of the library has not updated the library.properties to indicate a new version – it is still the same from 2018 although the code has been changed in 2019 with those functions you need. Thus with
You get an older version. You can also see that by looking into .pio\libdeps\esp01_1m\TelnetSpy\TelnetSpy.h where the actual library was downloaded and see that it has no such function.
To get the current github version which is still unreleased, change the platformio.ini to include a direct download link of the library (or the repo), via https://github.com/yasheena/telnetspy/archive/refs/heads/master.zip.