Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ESP8266 - IPaddress - compiler error (Read 1130 times)
Fritz
Newbies
*
Offline


Posts: 3
Joined: Sep 30th, 2019
ESP8266 - IPaddress - compiler error
Sep 30th, 2019 at 10:27am
Print Post  
Hi,

I'm using VM with Arduino IDE portable (1.8.9) to compile a project (.INO) for ESP8266 (-01).
Compiler returns an error :

Error            84:27: error: 'IPAddress' has not been declared 

but in Arduino IDE everything works fine.
At that line (84) there is no referring to IPaddress variable.

Attached you have VM and Arduino verbose compile output.

Any suggestions ?

Many thanks
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP8266 - IPaddress - compiler error
Reply #1 - Sep 30th, 2019 at 11:11am
Print Post  
It seems like an issue compiling the core, but it isn't shown in the output as previously compiled.

Could you run Build > Clean Solution, and then re-compile again with verbose and attach the output?
  
Back to top
 
IP Logged
 
Fritz
Newbies
*
Offline


Posts: 3
Joined: Sep 30th, 2019
Re: ESP8266 - IPaddress - compiler error
Reply #2 - Sep 30th, 2019 at 12:12pm
Print Post  
Sure.

For complete information :

the error is on line 84 
84 #define ESPasSTA 0

but the first use of IPaddress is on line 552
IPAddress wip;

Many thanks

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP8266 - IPaddress - compiler error
Reply #3 - Sep 30th, 2019 at 1:24pm
Print Post  
Would it be possible to send a copy of the file below to help with our debugging?

.cpp

  
Back to top
 
IP Logged
 
Fritz
Newbies
*
Offline


Posts: 3
Joined: Sep 30th, 2019
Re: ESP8266 - IPaddress - compiler error
Reply #4 - Sep 30th, 2019 at 2:00pm
Print Post  
I found the reason of that error.
This project is splitted in many files with names starting as '01_aaa' '02_bbb' '03_ccc' and the last one is HautESP.ino .
When the compiler create the monolitic file .cpp (named HautESP.cpp) all the functions defined in these files are written before the #include of the libraries.
One of these functions, has IPaddress in declaration.
IPaddress is defined in IPaddress.h which is defined after that function, and so we have the error.
The workaround could be create a single .INO file including all separates .INO files and define the #include before all.
Any other suggestions are welcome, otherwise I will create a single file.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint