Hi all,
I see a problem similar to the one reported here: Compile error (unless adding extra lines) when multiple files in a single sketch
When I create these three files (also attached as ZIP) in a directory called "Test"
Test.ino:
#include <ESP8266WiFi.h>
void setup()
{
}
void loop()
{
}
File_1.ino:
void function_declared_void(IPAddress parameter)
{
}
File_2.ino:
void a()
{
}
void b()
{
}
void c()
{
}
void make_this_function_name_shorter_to_work_around_bug()
{
}
void or_make_this_function_name_shorter_to_work_around_bug()
{
}
void f()
{
}
then "Verify" using Arduino IDE v1.8.8 fails with these messages:
File_1:1:29: error: variable or field 'function_declared_void' declared void
void function_declared_void(IPAddress parameter)
^
File_1:1:29: error: 'IPAddress' was not declared in this scope
exit status 1
variable or field 'function_declared_void' declared void
but when I change the code in one of these ways, it compiles without problem:
- In File_2.ino change "void make_this_function_name_shorter_to_work_around_bug()" to "void d()"
- In File_2.ino change "void or_make_this_function_name_shorter_to_work_around_bug()" to "void e()"
- In File_1.ino add "#include <ESP8266WiFi.h>" to the top as first line
- In File_1.ino change "void function_declared_void(IPAddress parameter)" to "void function_declared_void(int parameter)"
- In File_1.ino add an empty line to the top as first line
the problem also disappears when I use Arduino IDE version 1.9.0-beta, but that has multiple other problems (can't program or write data to ESP SPIFFS while serial monitor is running & sometimes all menu items are shown twice).
Do you recognize this problem? If so, (when) will it be solved?
Thank you,
woutput
Test.zip (753 Bytes)