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/']
While Bhushan Patil's answer should work, it would still make future projects tedious. Instead you can add the header files to the hardware library, and use them at will, with the `#include <library>` syntax every other library uses in C/C++.

The PlatformIO IDE has a config file you can modify that tells the IDE where to look for libraries. You could read this file, and determine where to put your header files, such that PlatformIO could find them, or add a location to look for header files in. See this page from the PlatformIO documentation:  

<http://docs.platformio.org/en/latest/projectconf.html>

Beyond that, you could also use the absolute path for the header file (library) you are trying to use, by doing something like

```
#include "/home/user/path/to/user/library.h"

```
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.