Skip to content

ARDUINO_VARIANT cannot be cast to (char*) when compiling in Eclipse/windows #2193

Closed
@Bascy

Description

@Bascy

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: commit ec3a97b (dec 15)
IDE name: Eclipse / Sloeber 4.3 plugin
Computer OS: Windows 10

Description:

On compilation of the ESPmDNS component the following code results in an error
error: 'esp32' was not declared in this scope
because the macro ARDUINO_VARIANT is replaced by esp32 and not by the string "esp32"

void MDNSResponder::enableArduino(uint16_t port, bool auth){
    mdns_txt_item_t arduTxtData[4] = {
        {(char*)"board"         ,(char*)ARDUINO_VARIANT},
        {(char*)"tcp_check"     ,(char*)"no"},
        {(char*)"ssh_upload"    ,(char*)"no"},
        {(char*)"auth_upload"   ,(char*)"no"}
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions