<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Cannot compile; error: expected type-specifier before 'CRemoteXYStream]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=1653&amp;type=atom" />
	<updated>2023-10-30T02:52:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=1653</id>
		<entry>
			<title type="html"><![CDATA[Re: Cannot compile; error: expected type-specifier before 'CRemoteXYStream]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5238#p5238" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>vBiggles wrote:</cite><blockquote><p>I&#039;m brand new to RemoteXY, I thought I&#039;d try it out with an ESP8266 relay board and an HC-05.</p><p>I&#039;ve set the board to Generic ESP8266 and added RemoteXY library however if I use SOFTWARESERIAL I get the following error, if I use HARDWARESERIAL it compiles fine.</p><p>If I set the board to an Arduino board it doesn&#039;t compile and presents the same error, which leads me to think it&#039;s something with my environment rather than a systemic issue or bug.&nbsp; I&#039;m hoping I could get some suggestions here?</p><p>Here&#039;s my code, the operational parts (relay on/off) aren&#039;t complete;</p><div class="codebox"><pre><code>/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.8 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.11.1 or later version;
     - for iOS 1.9.1 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          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__SOFTWARESERIAL
#include &lt;SoftwareSerial.h&gt;
#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX D1
#define REMOTEXY_SERIAL_TX D2
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 78 bytes
  { 255,4,0,0,0,71,0,16,31,1,2,0,33,9,22,11,2,26,31,31,
  79,78,0,79,70,70,0,2,0,33,23,22,11,2,26,31,31,79,78,0,
  79,70,70,0,2,0,33,36,22,11,2,26,31,31,79,78,0,79,70,70,
  0,2,0,33,50,22,11,2,26,31,31,79,78,0,79,70,70,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t switch_2; // =1 if switch ON and =0 if OFF 
  uint8_t switch_3; // =1 if switch ON and =0 if OFF 
  uint8_t switch_4; // =1 if switch ON and =0 if OFF 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define RELAY_1 13
#define RELAY_2 14
#define RELAY_3 15
#define RELAY_4 16

void setup() 
{
  RemoteXY_Init (); 
  
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(RELAY_1, (RemoteXY.switch_1==0)?LOW:HIGH);

  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}</code></pre></div><p>Here&#039;s the error;</p><div class="codebox"><pre><code>In file included from C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino:25:
C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino: In function &#039;void setup()&#039;:
c:\Users\mswin\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:166:117: error: expected type-specifier before &#039;CRemoteXYStream_SoftSerial&#039;
  166 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &amp;RemoteXY, REMOTEXY_ACCESS_PASSWORD, new CRemoteXYStream_SoftSerial (REMOTEXY_SERIAL_RX, REMOTEXY_SERIAL_TX, REMOTEXY_SERIAL_SPEED))
      |                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino:67:3: note: in expansion of macro &#039;RemoteXY_Init&#039;
   67 | 
      |   ^            

exit status 1

Compilation error: exit status 1</code></pre></div></blockquote></div><p>Where you able to resolved this issue? I have a esp32 and I am getting same error but cannot fix it.</p>]]></content>
			<author>
				<name><![CDATA[bustillos007]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2574</uri>
			</author>
			<updated>2023-10-30T02:52:02Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5238#p5238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cannot compile; error: expected type-specifier before 'CRemoteXYStream]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5162#p5162" />
			<content type="html"><![CDATA[<p>I changed the esp8266 version installed from 3.1.2 to an earlier version 2.5.2 and the failure was gone</p>]]></content>
			<author>
				<name><![CDATA[frans.eilering]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2504</uri>
			</author>
			<updated>2023-07-29T17:43:16Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5162#p5162</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Cannot compile; error: expected type-specifier before 'CRemoteXYStream]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5119#p5119" />
			<content type="html"><![CDATA[<p>Recently I&#039;ve been having the same problem.</p><p>I modified the interface but after cutting and pasting I got this error. I have tried to update but the problem persists.</p><p>Edit: I&#039;m such an idiot... I had the wrong board selected in the configuration part of the RemoteXY editor.</p>]]></content>
			<author>
				<name><![CDATA[Dennis]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2453</uri>
			</author>
			<updated>2023-05-08T08:27:46Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5119#p5119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Cannot compile; error: expected type-specifier before 'CRemoteXYStream]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=5112#p5112" />
			<content type="html"><![CDATA[<p>I&#039;m brand new to RemoteXY, I thought I&#039;d try it out with an ESP8266 relay board and an HC-05.</p><p>I&#039;ve set the board to Generic ESP8266 and added RemoteXY library however if I use SOFTWARESERIAL I get the following error, if I use HARDWARESERIAL it compiles fine.</p><p>If I set the board to an Arduino board it doesn&#039;t compile and presents the same error, which leads me to think it&#039;s something with my environment rather than a systemic issue or bug.&nbsp; I&#039;m hoping I could get some suggestions here?</p><p>Here&#039;s my code, the operational parts (relay on/off) aren&#039;t complete;</p><div class="codebox"><pre><code>/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 3.1.8 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.11.1 or later version;
     - for iOS 1.9.1 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          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__SOFTWARESERIAL
#include &lt;SoftwareSerial.h&gt;
#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX D1
#define REMOTEXY_SERIAL_TX D2
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =   // 78 bytes
  { 255,4,0,0,0,71,0,16,31,1,2,0,33,9,22,11,2,26,31,31,
  79,78,0,79,70,70,0,2,0,33,23,22,11,2,26,31,31,79,78,0,
  79,70,70,0,2,0,33,36,22,11,2,26,31,31,79,78,0,79,70,70,
  0,2,0,33,50,22,11,2,26,31,31,79,78,0,79,70,70,0 };
  
// this structure defines all the variables and events of your control interface 
struct {

    // input variables
  uint8_t switch_1; // =1 if switch ON and =0 if OFF 
  uint8_t switch_2; // =1 if switch ON and =0 if OFF 
  uint8_t switch_3; // =1 if switch ON and =0 if OFF 
  uint8_t switch_4; // =1 if switch ON and =0 if OFF 

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

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define RELAY_1 13
#define RELAY_2 14
#define RELAY_3 15
#define RELAY_4 16

void setup() 
{
  RemoteXY_Init (); 
  
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(RELAY_1, (RemoteXY.switch_1==0)?LOW:HIGH);

  // TODO you loop code
  // use the RemoteXY structure for data transfer
  // do not call delay() 


}</code></pre></div><p>Here&#039;s the error;</p><div class="codebox"><pre><code>In file included from C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino:25:
C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino: In function &#039;void setup()&#039;:
c:\Users\mswin\Documents\Arduino\libraries\RemoteXY\src/RemoteXY.h:166:117: error: expected type-specifier before &#039;CRemoteXYStream_SoftSerial&#039;
  166 |   #define RemoteXY_Init() remotexy = new CRemoteXY (RemoteXY_CONF_PROGMEM, &amp;RemoteXY, REMOTEXY_ACCESS_PASSWORD, new CRemoteXYStream_SoftSerial (REMOTEXY_SERIAL_RX, REMOTEXY_SERIAL_TX, REMOTEXY_SERIAL_SPEED))
      |                                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\mswin\AppData\Local\Temp\Temp1_project-2023-04-26-09-13-42.zip\project\project.ino:67:3: note: in expansion of macro &#039;RemoteXY_Init&#039;
   67 | 
      |   ^            

exit status 1

Compilation error: exit status 1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vBiggles]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=2442</uri>
			</author>
			<updated>2023-04-26T21:32:08Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=5112#p5112</id>
		</entry>
</feed>
