Skip to content

Compile error for ESP32C3 #480

@justind000

Description

@justind000

With the most recent ESP32 core (2.0.3-RC1), there are compile errors when compiling for ESP32C3. I haven't tried with different core versions.

Full error log here
Relevant error is AutoConnect.h:94:12: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous dns2(0U) {}

A quick search shows this error has come up for another library as well with no upstream fix yet.

Fix is to change AutoConnect.h lines 90-94 and 134-138 by adding a typecast.
staip(0U), staGateway(0U), staNetmask(0U), dns1(0U), dns2(0U) {}
to
staip((uint32_t)0U), staGateway((uint32_t)0U), staNetmask((uint32_t)0U), dns1((uint32_t)0U), dns2((uint32_t)0U) {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedThe issue has been resolved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions