-
Notifications
You must be signed in to change notification settings - Fork 106
Callback was not decleared #1
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
Comments
This is a known issue with the ESP core for Arduino (Even though it seems like its the PubSubClient, I'm pretty sure its an issue related to the core files). It's not yet compatible with 1.6.9 - I use 1.6.5 for everything ESP related. Try using that and let me know if it compiles then. |
I still use 1.6.9 but used the example that came withe the pubsubclient, This is a known issue with the ESP core for Arduino (Even though it seems — |
That is why it's an issue with the ESP core files. None of the examples in my pubsubclient folder are for the ESP and dont include the "ESP8266WIFI.h" library. The examples compile on my version of 1.6.9 as well but with the ESP library included it fails. |
In the pubsubclient there is an example called mqtt_esp8266. And that is
|
Doesn't it fail because the compiler needs to know about the functions ahead of time?? So using function prototypes solved this for me: |
Yes that is the problem and under a normal compiler you would have to declare the prototype at the top of the code but the ESP-Arduino compiler is supposed to handle this for users. It has been acknowledged by their community as well over here. They compile just fine for me on 1.6.5 but fail once I try it on anything above. The solution of placing the prototype at the top of the file works so far as this issue is concerned but doesn't actually solve the systemic issue which is caused by the ESP compiler. |
Uh oh!
There was an error while loading. Please reload this page.
I downloaded it
i have installed the esp board lib.
but when i try to compile i say that call back is not decleared at this line.
PubSubClient client(MQTT_SERVER, 1883, callback(), wifiClient);
arduino ide 1.6.9
The text was updated successfully, but these errors were encountered: