user10394: I have just added the ESP32 toolchain to the Arduino IDE (v1.8.0) on Windows 10.  To get the IDE to allow me to select ESP32 chips I had to place the Espressif folder in "D:\Program Files(x86)\Arduino\hardware" (Yes my C drive is called D, its a long story)
I managed to compile and run Blink and after several minutes of celebration I tried the ESP32 Example Wifi->WifiScan.  It failed to compile because 
WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'
In file included from D:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\spi_drv.cpp:21:0:

D:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:16:26: fatal error: avr/pgmspace.h: No such file or directory

compilation terminated.

Multiple libraries were found for "WiFi.h"
 Used: D:\Program Files (x86)\Arduino\libraries\WiFi
 Not used: D:\Program Files (x86)\Arduino\hardware\espressif\ESP32\libraries\WiFi
Multiple libraries were found for "SPI.h"
 Used: D:\Program Files (x86)\Arduino\libraries\SPI
 Not used: D:\Program Files (x86)\Arduino\hardware\espressif\ESP32\libraries\SPI
exit status 1
Error compiling for board ESP32 Dev Module.

If I am reading this correctly, there are a couple of duplicate libraries, Arduino versions and ESP32 versions and the IDE picked the Arduino versions.
Is there a way of telling the IDE to prefer the ESP32 libraries rather than Arduino ones?  I suspect all I need to do is change the order of the -I and -L commands, but I don't have a clue how, or if that's the right thing to do.

user1576: #include "filename.h" will look in the sketch folder
#include <filename.h> will look in the path, defined in File | Preferences, edit preferences.txt, search for sketchbook.path

10394: <p>I have just added the ESP32 toolchain to the Arduino IDE (v1.8.0) on Windows 10.  To get the IDE to allow me to select ESP32 chips I had to place the Espressif folder in "D:\Program Files(x86)\Arduino\hardware" (Yes my C drive is called D, its a long story)</p>

<p>I managed to compile and run Blink and after several minutes of celebration I tried the ESP32 Example Wifi->WifiScan.  It failed to compile because </p>

<pre><code>WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'
In file included from D:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\spi_drv.cpp:21:0:

D:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:16:26: fatal error: avr/pgmspace.h: No such file or directory

compilation terminated.

Multiple libraries were found for "WiFi.h"
 Used: D:\Program Files (x86)\Arduino\libraries\WiFi
 Not used: D:\Program Files (x86)\Arduino\hardware\espressif\ESP32\libraries\WiFi
Multiple libraries were found for "SPI.h"
 Used: D:\Program Files (x86)\Arduino\libraries\SPI
 Not used: D:\Program Files (x86)\Arduino\hardware\espressif\ESP32\libraries\SPI
exit status 1
Error compiling for board ESP32 Dev Module.
</code></pre>

<p>If I am reading this correctly, there are a couple of duplicate libraries, Arduino versions and ESP32 versions and the IDE picked the Arduino versions.</p>

<p>Is there a way of telling the IDE to prefer the ESP32 libraries rather than Arduino ones?  I suspect all I need to do is change the order of the -I and -L commands, but I don't have a clue how, or if that's the right thing to do.</p>
 1576: <p><code>#include "filename.h"</code> will look in the sketch folder</p>

<p><code>#include &lt;filename.h&gt;</code> will look in the path, defined in <em>File</em> | <em>Preferences</em>, edit <strong>preferences.txt</strong>, search for sketchbook.path</p>
