Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
ESP8266 - IPaddress - compiler error (Read 98 times)
Fritz
Newbies
*
Offline



Posts: 3
ESP8266 - IPaddress - compiler error
Sep 30th, 2019 at 11:27am
 
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
Back to top
 

VM_compile.txt (94 KB | 2 )
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 43
Re: ESP8266 - IPaddress - compiler error
Reply #1 - Sep 30th, 2019 at 12:11pm
 
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
Re: ESP8266 - IPaddress - compiler error
Reply #2 - Sep 30th, 2019 at 1:12pm
 
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

Back to top
 

VM_compile_001.txt (413 KB | 2 )
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



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

C:\Users\bgf\AppData\Local\Temp\VMBuilds\HautESP\esp8266_generic\Release\HautESP
.cpp

Back to top
 
 
IP Logged
 
Fritz
Newbies
*
Offline



Posts: 3
Re: ESP8266 - IPaddress - compiler error
Reply #4 - Sep 30th, 2019 at 3:00pm
 
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 Topic Print