-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Error compiling for board NodeMCU 1.0 (ESP-12E Module)on one Windows-based machine but is able to compile on other Windows-based machines #8611
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
...\src\SimpleEspNowConnection.cpp: In member function 'bool SimpleEspNowConnection::DeviceMessageBuffer::deleteBuffer(const uint8_t*, long int)':
...\src\SimpleEspNowConnection.cpp:195:1: error: no return statement in function returning non-void [-Werror=return-type]
195 | }
| ^
Please read ESP32 has the same issue btw, it's just hidden due to warning not being fatal since the Core does not force it to become an error Another issue is IDE warning settings were unintentionally disabling |
Is there an estimate on when 3.1.0 will be released? or is there a temporary workaround that i can use to bypass the warnings/make it not crash? as for now i am unable to change the library as it would take a decent amount of time to understand another library. Thank you for your answer and explanation |
I should empathize that disabling warnings is not a workaround! Missing return value may cause a crash, or may not. It is simply undefined behaviour, anything could happen. Fixing the library would be best. |
i got this after changing from bool to void, seems like it wasn't able to compile at all. there are other errors that popped up aside from this one also sorry for the late reply |
Make sure of two things
// .h
void deleteBuffer(const uint8_t *device, long id);
// .cpp
void SimpleEspNowConnection::DeviceMessageBuffer::deleteBuffer(const uint8_t *device, long id) { |
Thank you, i have fixed the problem and modified the library for now. |
Basic Infos
Platform
Settings in IDE
Problem Description
I am currently using a Windows 10 machine to code my sketches. I used the SimpleEspNowConnection library from here to get more utility out of the feature. I was currently coding for a versatile code that can be applied to either ESP32 or ESP8266. But when i compiled the code for ESP8266, the sketch compiler returned an error in the screenshot below;
first i thought that my code was wrong, and assuming that my code was mistyped i tried to compile the example sketch that was included in the library. but it turns out that the example sketch got the same error. I was confused, as last night i was able to compile it for the ESP32 one, but somehow it won't compile for the ESP8266. the library excplicitly stated that it supports both ESP32 and ESP8266. then out of curiosity, i had a Windows 11 machine with an Intel cpu. i tried compiling the code in that machine, and suddenly it compiled without a problem, as seen in the screenshot below;
I thought maybe my main machine was acting up, so i already did a restart multiple times, and re ran the comile side by side with the ESP32 one. the ESP32 still ran without a hitch, and is able to be flashed normally, meanwhile the ESP8266 one gave me a compiler error as seen in the screenshot below;
MCVE Sketch
This is the sketch example that is included within the library / documentation.
Debug Messages
The text was updated successfully, but these errors were encountered: