1 (edited by JimE 2024-04-29 18:42:16)

Topic: Not Able to Compile

I have the following issue when I attempt to compile using VSCode

lib\RemoteXY/RemoteXY2.h:196:122: error: expected type-specifier before 'CRemoteXYComm_WiFi'
  196 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, new CRemoteXYConnectionServer (new CRemoteXYComm_WiFi (REMOTEXY_WIFI_SSID, REMOTEXY_WIFI_PASSWORD), REMOTEXY_SERVER_PORT), REMOTEXY_ACCESS_PASSWORD)

I am attempting to compile this for an ESP8266 using WiFi communication (via a network).  If I look at the instance of
CRemoteXYConnectionServer (CRemoteXYComm * _comm, uint16_t _port = 0)
It looks like it is expecting something "different" than the CRRemoteXYComm_WiFi.

I have attempted this with various Library versions (both from PlatformIO and GitHub and this site) - and no difference. 
I may be missing something silly - but at this point I am at a loss.  Note:  I also used the alternative code that exists in other examples

    // remotexy = new CRemoteXY(
    //     RemoteXY_CONF_PROGMEM,
    //     &RemoteXY,
    //     new CRemoteXYConnectionServer(
    //        new CRemoteXYComm_WiFi(
    //           SSID1, // REMOTEXY_WIFI_SSID
    //           PSK1), // REMOTEXY_WIFI_PASSWORD
    //        6377        // REMOTEXY_SERVER_PORT
    //        ));

It has the same failure.

Thanks


NEVER MIND:  After playing with the LIBRARY files - and recoding some of it - I got it to compile and function.  This is a fact I have found happens alot with code built for ArduinoIDE vs VSCode.   IMHO - the Arduino does not follow strict C / C++ development requirements (one of the reasons I dont use it).
Anyway - it is compiling - and basically running.  Still need to reworkd the WiFi code (want to use a static addr) - but that is simply one of "my things".

Thanks

2

Re: Not Able to Compile

If you do not use RemoteXY_Init () function in the setup(), you need to remove #define REMOTEXY_MODE__XXXX definition.

// #define REMOTEXY_MODE__ESP8266WIFI_LIB