Hi everyone. I am having issue to compile weather station sketch on my Nodemcu V1.0. Always get “exit status 1 error in compiling for board Nodemcu V1.0”. Have tried with different version of esp8266 community and libraries. However i have not problem running other sketches using wifi. Clueless now. Anyone
Do you have any more information regarding that issue? Can you post the full error message?
Thanks!
No other information. Only “exit status 1 error compiling for board Nodemcu 1.0”
Thank you.
With your current configuration, after a compilation attempt if you scroll up, it should be printing more error messages.
The “exit status 1 error” is just the generic message, but above it prints exactly why that happened.
You can also go to the Arduino IDE menu: File > Preferences > and enable the “Show verbose output during” compilation and upload for more debugging information.
Thanks!
Please find below :-
Arduino: 1.8.9 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200" "C:\\Users\\qsde\\AppData\\Local\\Temp\\arduino_build_461485\\sketch\\WeatherStationDemo.ino.cpp.o" In file included from C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station\src/OpenWeatherMapCurrent.h:25:0, from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:38: C:\Users\qsde\Documents\Arduino\libraries\JsonListener/JsonListener.h:1:7: error: redefinition of 'class JsonListener' class JsonListener { ^ In file included from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:28:0: C:\Users\qsde\Documents\Arduino\libraries\JsonListener/JsonListener.h:1:7: error: previous definition of 'class JsonListener' class JsonListener { ^ In file included from C:\Users\qsde\Documents\Arduino\libraries\Json_Streaming_Parser/JsonStreamingParser.h:29:0, from C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station\src/OpenWeatherMapCurrent.h:26, from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:38: C:\Users\qsde\Documents\Arduino\libraries\Json_Streaming_Parser/JsonListener.h:30:7: error: redefinition of 'class JsonListener' class JsonListener { ^ In file included from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:28:0: C:\Users\qsde\Documents\Arduino\libraries\JsonListener/JsonListener.h:1:7: error: previous definition of 'class JsonListener' class JsonListener { ^ In file included from C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station\src/OpenWeatherMapForecast.h:25:0, from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:39: C:\Users\qsde\Documents\Arduino\libraries\JsonListener/JsonListener.h:1:7: error: redefinition of 'class JsonListener' class JsonListener { ^ In file included from C:\Users\qsde\AppData\Local\Temp\arduino_modified_sketch_187177\WeatherStationDemo.ino:28:0: C:\Users\qsde\Documents\Arduino\libraries\JsonListener/JsonListener.h:1:7: error: previous definition of 'class JsonListener' class JsonListener { ^ Multiple libraries were found for "JsonListener.h" Used: C:\Users\qsde\Documents\Arduino\libraries\JsonListener Not used: C:\Users\qsde\Documents\Arduino\libraries\Json_Streaming_Parser Multiple libraries were found for "SSD1306Wire.h" Used: C:\Users\qsde\Documents\Arduino\libraries\esp8266-oled-ssd1306-master Not used: C:\Users\qsde\Documents\Arduino\libraries\ESP8266_and_ESP32_Oled_Driver_for_SSD1306_display-4.0.0 Using library ESP8266_Weather_Station at version 1.6.0 in folder: C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station Using library ESP8266WiFi at version 1.0 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266WiFi Using library ESP8266HTTPClient at version 1.2 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266HTTPClient Using library JsonListener in folder: C:\Users\qsde\Documents\Arduino\libraries\JsonListener (legacy) Using library esp8266-oled-ssd1306-master at version 4.0.0 in folder: C:\Users\qsde\Documents\Arduino\libraries\esp8266-oled-ssd1306-master Using library Wire at version 1.0 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\Wire Using library Json_Streaming_Parser at version 1.0.5 in folder: C:\Users\qsde\Documents\Arduino\libraries\Json_Streaming_Parser exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).
No problem! I’ve edited your comment with the relevant information.
It looks like you’re using the wrong version of the JsonListener library and that’s why it’s causing that error.
First, you need to clean your Arduino libraries directory, because you have repeated/the same libraries with different names:
- Multiple libraries were found for “JsonListener.h”
- Used: C:\Users\qsde\Documents\Arduino\libraries\JsonListener
- Not used: C:\Users\qsde\Documents\Arduino\libraries\Json_Streaming_Parser
- Multiple libraries were found for “SSD1306Wire.h”
- Used: C:\Users\qsde\Documents\Arduino\libraries\esp8266-oled-ssd1306-master
- Not used: C:\Users\qsde\Documents\Arduino\libraries\ESP8266_and_ESP32_Oled_Driver_for_SSD1306_display-4.0.0
I recommend deleting those libraries and installing the latest versions again:
- JSON Streaming Parser by Daniel Eichhorn: https://github.com/squix78/json-streaming-parser
- ESP8266 OLED Driver for SSD1306 display by Daniel Eichhorn: https://github.com/ThingPulse/esp8266-oled-ssd1306
You can remove the verbose debugging in the next debugging information. Thanks.
Hi I have deleted those multiple libraries and installed the 2 new libraries. On compiling 2 errrors have com up namely :-
C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station\src\TimeClient.cpp: In member function ‘long int TimeClient::getCurrentEpochWithUtcOffset()’:
C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station\src\TimeClient.cpp:124:67: error: invalid operands of types ‘double’ and ‘long int’ to binary ‘operator%’
return round(getCurrentEpoch() + 3600 * myUtcOffset + 86400L) % 86400L;
^
Using library ESP8266_Weather_Station at version 1.6.0 in folder: C:\Users\qsde\Documents\Arduino\libraries\ESP8266_Weather_Station
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266WiFi
Using library ESP8266HTTPClient at version 1.2 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266HTTPClient
Using library json-streaming-parser-master at version 1.0.5 in folder: C:\Users\qsde\Documents\Arduino\libraries\json-streaming-parser-master
Using library esp8266-oled-ssd1306-master at version 4.0.0 in folder: C:\Users\qsde\Documents\Arduino\libraries\esp8266-oled-ssd1306-master
Using library Wire at version 1.0 in folder: C:\Users\qsde\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\Wire
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
It looks like this issue is also fixed in the latest ESP8266 Weather Station library: https://github.com/ThingPulse/esp8266-weather-station/issues/148
Can you remove the ESP8266_Weather_Station library version 1.6.0 that you have installed. Then, install the latest version: https://github.com/ThingPulse/esp8266-weather-station
After that, the code should compile successfully.
Thanks for your patience!