PlatformIO Community

Arduino filename case insensivity on Windows

Hello,

I observed kind of bug or difference in behavior from Arduino IDE. If you have for eg. file wifi.h in src directory and you #include Wifi.h and #include wifi.h only wifi.h will be included. With Arduino IDE it will include both even on Windows. Also Eclipse will open correctly Wifi.h from ESP SDK. I would never name header file same as some core header with different letter case. But it toke my few hours to debug why ESP32_FastLED_AsyncWebserver won’t compile in pio and in Arduino IDE yes.

I’ am attaching compiler error log. Maybe someone will find this post useful.

In file included from src\ESP32_FastLED_AsyncWebserver.cpp:46:0:
src/WiFi.h:36:1: error: ‘DNSServer’ does not name a type
DNSServer dnsServer;
^
src/WiFi.h: In function ‘void setupWiFi()’:
src/WiFi.h:112:5: error: ‘WiFi’ was not declared in this scope
WiFi.disconnect();
^
src/WiFi.h:113:15: error: ‘WIFI_AP’ was not declared in this scope
WiFi.mode(WIFI_AP);
^
src/WiFi.h:136:5: error: ‘dnsServer’ was not declared in this scope
dnsServer.setErrorReplyCode(DNSReplyCode::NoError);
^
src/WiFi.h:136:33: error: ‘DNSReplyCode’ has not been declared
dnsServer.setErrorReplyCode(DNSReplyCode::NoError);
^
src/WiFi.h:139:5: error: ‘WiFi’ was not declared in this scope
WiFi.disconnect();
^
src/WiFi.h:140:15: error: ‘WIFI_STA’ was not declared in this scope
WiFi.mode(WIFI_STA);
^
src/WiFi.h:151:29: error: ‘WL_CONNECTED’ was not declared in this scope
while (WiFi.status() != WL_CONNECTED) {

1 Like