I used platformio IDE

I did "platformio lib install 1101"
(<http://platformio.org/lib/show/1101/ESP8266wifi>),

I installed this: <http://platformio.org/lib/show/549/WebSockets> (follow instructions)

I did similar things to other libraries.

When I click the platformio:build button, it still complains:

> 
> fatal error: ESP8266WiFi.h: No such file or directory fatal error:
> 
> 
> ESP8266WiFiMulti.h: No such file or directory fatal error:
> 
> 
> ESP8266Webserver.h: No such file or directory
> 
> 
>
['https://arduino.stackexchange.com/questions/23809', 'https://arduino.stackexchange.com', 'https://arduino.stackexchange.com/users/20742/']
Make sure **ESP8266WiFi.h**, **ESP8266WiFiMulti.h**, **ESP8266Webserver.h** files are located in the same directory where your \*.uno file present.
Note the different capitalization: ESP8266**w**i**f**i vs ESP8266**W**i**F**i. Confusing as it may be, these are actually two completely different libraries. 

[ekstrand/ESP8266wifi](https://github.com/ekstrand/ESP8266wifi) is a library that is to be used when you are controlling an ESP8266 running the AT firmware over a serial connection from another microcontroller board such as a more traditional Arduino. The code does not run on the ESP8266.

ESP8266WiFi is a library bundled with the [ESP8266 core for Arduino](https://github.com/esp8266/Arduino/blob/master/doc/esp8266wifi/readme.rst). It is used for controlling the WiFi functionality of the ESP8266 when you are directly programming the ESP8266.

The WebSocket sketch you were attempting to compile was written for use with the latter library. The WebSockets library can not be used with the ekstrand/ESP8266wifi library or generally any configuration that uses the ESP8266 as a WiFi module running the AT firmware.