-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Esp8266 2.4.1 update issue #4605
Comments
You indeed found that functions must be declared before using them, this is how C and C++ languages works. The spurious warning is just a warning from the Arduino IDE. It is up to you to (re)move that directory from that library if you think you can do it. Anyway this is not an issue with the esp8266/arduino core. So closing. |
@d-a-v in Arduino, it should work. Arduino preprocessor should generate prototypes automatically so that users don't have to bother writing forward declarations. I can imagine what you think about this practice, but that's how it is supposed to work. If it doesn't, it means that we have pulled in some header file into Arduino.h which confuses the preprocessor, messing up prototype generation. Need to check this. |
Thanks @igrr |
I can't reproduce this with Arduino IDE 1.8.2 and the provided code above, I get a clean build. |
@igrr as you know it is the theory, but there are many cases in which the theory fails. An attempt has already been made to improve this on IDE Arduino 1.6.7 (17 december 2015)(see changelog https://www.arduino.cc/en/Main/ReleaseNotes) and many issues arduino/arduino-builder#68 (in this one you collaborated ;-) ). But it still fails sometimes. An example of many other, fail with no-UTF path: That is why it is good practice to declare the functions before using them, it costs nothing. In any case, it is not a problem with the ESP8266-Arduino framework. Regards. |
I have tested the failing sketch with arduino-1.9beta, works too. |
I updated the arduino version 1.6.9 to 1.8.5. Now it is working perfectly. |
jeesonraphael
Hi,
I have installed esp8266 v 2.4.1 by using board manager. During the time of compiling there showing an error -- functions are " not declared in this scope ". But if I moved that function to the top of "void setup()" code is running smoothly. I am just a beginner in this.
. . . . error code . . . . .
. . . . error message . . . . .
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
. . . . . running code . . . . .
The text was updated successfully, but these errors were encountered: