1 (edited by justGuner 2024-05-27 20:09:35)

Topic: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

I am trying to compile a code for an esp32 in Arduino IDE, and when I try I get the same error.
I've set the board as a NodeMCU-32S.
Reinstalling the RemoteXY library didn't fix it.

Here's the code:

/*
   -- rc drift car --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.13 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.13.13 or later version;
     - for iOS 1.10.3 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// you can enable debug logging to Serial at 115200
//#define REMOTEXY__DEBUGLOG    

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__WIFI_POINT


// RemoteXY connection settings 
#define REMOTEXY_WIFI_SSID "RC_DRIFTCAR"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377


#include <RemoteXY.h>
#include <WiFi.h>
#include <ESP32Servo.h>

// RemoteXY GUI configuration  
#pragma pack(push, 1)  
uint8_t RemoteXY_CONF[] =   // 61 bytes
  { 255,3,0,0,0,54,0,17,0,0,0,200,1,200,80,1,1,3,0,4,
  16,2,18,73,48,163,26,4,135,29,62,16,176,162,26,10,160,61,13,13,
  57,4,247,214,70,79,82,87,65,82,68,0,214,82,69,86,69,82,83,69,
  0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  int8_t slider_01; // from 0 to 100
  int8_t slider_02; // from -100 to 100
  uint8_t pushSwitch_01; // =1 if state is ON, else =0

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;   
#pragma pack(pop)
 
/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

int x, y;

const int rel_1 = 23;
const int rel_2 = 22;

Servo servo;
Servo ESC;

void setup() 
{
  RemoteXY_Init (); 
  
 // pinMode (servo, OUTPUT);
 // pinMode (ESC, OUTPUT);
  pinMode (rel_1, OUTPUT);
  pinMode (rel_2, OUTPUT);

  servo.attach(1);
  ESC.attach(3);
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();

  if (RemoteXY.pushSwitch_01 = 1)
  {
    digitalWrite(rel_1, HIGH);
    digitalWrite(rel_2, HIGH);
  }

  else
  {
    digitalWrite(rel_1, LOW);
    digitalWrite(rel_2, LOW);
  }

  x = map(RemoteXY.slider_01, 0, 0, 100, 180);
  y = map(RemoteXY.slider_02, -100, 0, 100, 180);

  servo.write(y);
  ESC.write(x);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay(), use instead RemoteXY_delay() 


}

Here's the error mesage:

In file included from C:\Users\erdog\Documents\Arduino\rc_driftcar\rc_driftcar.ino:35:
C:\Users\erdog\Documents\Arduino\rc_driftcar\rc_driftcar.ino: In function 'void setup()':
c:\Users\erdog\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:208:122: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'
  208 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, new CRemoteXYConnectionServer (new CRemoteXYComm_WiFiPoint (REMOTEXY_WIFI_SSID, REMOTEXY_WIFI_PASSWORD), REMOTEXY_SERVER_PORT), REMOTEXY_ACCESS_PASSWORD)
      |                                                                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
C:\Users\erdog\Documents\Arduino\rc_driftcar\rc_driftcar.ino:75:3: note: in expansion of macro 'RemoteXY_Init'
   75 |   RemoteXY_Init ();
      |   ^~~~~~~~~~~~~
Multiple libraries were found for "WiFi.h"
  Used: C:\Users\erdog\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0\libraries\WiFi
  Not used: C:\Users\erdog\Documents\Arduino\libraries\WiFi
exit status 1

Compilation error: exit status 1

2

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

As a sanity check, I've tried compiling the original code generated by the RemoteXY editor, and it still spits out the same error.

3

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

justGuner wrote:

As a sanity check, I've tried compiling the original code generated by the RemoteXY editor, and it still spits out the same error.

I'm having similar issue. I'm trying to make cloud server remote.

For me also compiling the code from editor, gives similar error, referenced to a line in RemoteXY library:

In file included from C:\Users\marti\Documents\Arduino\xddd\xddd.ino:39:
C:\Users\marti\Documents\Arduino\xddd\xddd.ino: In function 'void setup()':
c:\Users\marti\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:212:121: error: expected type-specifier before 'CRemoteXYComm_WiFi'
  212 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &RemoteXY, new CRemoteXYConnectionCloud (new CRemoteXYComm_WiFi (REMOTEXY_WIFI_SSID, REMOTEXY_WIFI_PASSWORD), REMOTEXY_CLOUD_SERVER, REMOTEXY_CLOUD_PORT, REMOTEXY_CLOUD_TOKEN), REMOTEXY_ACCESS_PASSWORD)
      |                                                                                                                         ^~~~~~~~~~~~~~~~~~
C:\Users\marti\Documents\Arduino\xddd\xddd.ino:71:3: note: in expansion of macro 'RemoteXY_Init'
   71 |   RemoteXY_Init ();
      |   ^~~~~~~~~~~~~

exit status 1

Compilation error: exit status 1

Really would appretiate some soulution. If the problem is in the library, is there perhaps a workaround, to make it work without using the library?

4

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

Including the WiFi.h library must be before including the RemoteXY.h library

5

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

same problem here, unable to compil with the same setting, Wifi and ESP32

6

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

If you're using the board: esp32 by Espressif 3.0.0 or 3.0.1 try changing it to version 2.0.17, it fixed my issue.

7

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

vikuro55 wrote:

If you're using the board: esp32 by Espressif 3.0.0 or 3.0.1 try changing it to version 2.0.17, it fixed my issue.

Thanks, this seems to work. Atleast the code generated from the editor now compiles.

8

Re: error: expected type-specifier before 'CRemoteXYComm_WiFiPoint'

Thanks for this info, it is runing for me too.
Anyway, i hope that the remoteXY library will be updated and will be Ok for the new version of ESP32 library !