-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Error: Expected ')' before numeric constant #6247
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
@VOMediola |
any updates @VOMediola ? |
I've also had this compile error before. Changing the const IPAddress as stated above does get rid of the error and let's the compile finish.
That's with: 2.02 and ½ ;) These are the includes from the OTA file and I think one of them, or a dependency of one, has a conflict with const IPAddress INADDR_NONE(0,0,0,0). #include <string.h> |
This issue is linked to the issue described in #6610 |
We are currently working on a definitive solution. |
The main issue is that <lwip/inet.h> declares When <lwip/inet.h> is included, it makes the Arduino declaration of "IPAddress INADDR_NONE(0,0,0,0)" invalid, causing a potential compilation error depending on the |
We are currently working on a solution for it. |
Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for #6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes #6610 fixes #6247 fixes #4732
Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for espressif#6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes espressif#6610 fixes espressif#6247 fixes espressif#4732 Co-authored-by: Rodrigo Garcia <[email protected]>
* Tasmota changes * Fixes INADDR_NONE (espressif#6659) (#136) Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for espressif#6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes espressif#6610 fixes espressif#6247 fixes espressif#4732 Co-authored-by: Rodrigo Garcia <[email protected]> * Update README.md Co-authored-by: Rodrigo Garcia <[email protected]>
Issue persist with idf 5.1.2 and 3.0.0 alpha2 build of Arduino esp. Declarations of INADDR_NONE between cores/esp32/IPAddress.h and components/lwip/lwip/src/include/lwip/inet.h are in conflict. |
Just upgraded to 5.1.2 and just like with the previous version, compilation fails unless you comment out the line: |
This sketch produces the error.
The solution has been addressed here: |
Board
esp32
Device Description
n/a
Hardware Configuration
n/a
Version
latest master
IDE Name
esp-idf v4.4
Operating System
linux
Flash frequency
40
PSRAM enabled
no
Upload speed
115200
Description
I have the same issue as described here microsoft/azure-iot-developer-kit#169 when trying to use Arduino core in https://github.com/project-chip/connectedhomeip/.
Solution is the same - replace
const IPAddress INADDR_NONE(0,0,0,0);
with
const IPAddress IP_ADDR_NONE(0,0,0,0);
in cores\arduino\IPAddress.h
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: