# ESP32 Thing compile errors on BLE sketches

**URL:** <https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587>\
**Category:** Arduino\
**Created:** [October 15, 2022, 4:14am UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587 "2022-10-15T04:14:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimsellon](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jimsellon](https://community.sparkfun.com/u/jimsellon)\
**Post date:** [October 15, 2022, 4:14am UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/1 "2022-10-15T04:14:40Z")

</div>

I’m programming the ESP32 Thing in Arduino IDE 2.0.0, and I’m trying to implement BLE, but I get compile errors with BLE sketches. I’ve attached the errors text file.

A randomly selected non BLE ESP32 Example sketch compiles and downloads without errors. The example sketch tested was:

Examples\Examples for Sparkfun ESP32 Thing\ESP32\HallSensor

But when I try to compile an ESP32 Example BLE sketch such as:

Examples\Examples for Sparkfun ESP32 Thing\ESP32 BLE Arduino\BLE\_Scan, I get compile errors as show in the attached text file.

I tried reinstalling the IDE and it didn’t help. I also get the same errors using the Arduino 1.8.12 IDE.

I can’t tell if this is a library file path issue, or an issue with the Sparkfun libraries, or what. I Googled this issue and searched the forum, but didn’t find anything that solved my problem.

Can you tell what I need to do to correct this?

[ESP32 Thing BLE sketch compile errors.txt](https://community.sparkfun.com/uploads/short-url/5oFSIvnZT9sESYbl6KsqWlC0FpS.txt) (4.4 KB)

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [October 17, 2022, 6:24pm UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/2 "2022-10-17T18:24:31Z")

</div>

I haven’t seen that before, but almost every time I have a compile error for esp32 it’s because arduino has gotten the board definitions mixed up somehow; try wiping the board def folder like so [https://support.arduino.cc/hc/en-us/art … rduino-IDE](https://support.arduino.cc/hc/en-us/articles/360021325733-Uninstall-Arduino-IDE) (delete the add’l files folder and re-install the board definitions) and try again

---

<div class="post-metadata">

**Author:** ![jimsellon](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jimsellon](https://community.sparkfun.com/u/jimsellon)\
**Post date:** [October 18, 2022, 10:30pm UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/3 "2022-10-18T22:30:39Z")

</div>

First of all, thanks for the reply.

I followed the link you gave. They mention “removing additional files” and you said “delete the add’l files folder”, but I don’t have an “additional files” folder. Are you referring to the “libraries” folder? My libraries folder has 51 subfolders in it. Maybe that’s part of my problem.

Thanks.

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [October 20, 2022, 9:49pm UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/4 "2022-10-20T21:49:13Z")

</div>

Yep…just wipe it all and reinstall as needed is usually the fastest way to get it going again…I’ve had to do it 3-4x per year lol

---

<div class="post-metadata">

**Author:** ![jimsellon](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jimsellon](https://community.sparkfun.com/u/jimsellon)\
**Post date:** [October 22, 2022, 4:55am UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/5 "2022-10-22T04:55:36Z")

</div>

I will delete the library files this weekend and try it all again. Thanks.

---

<div class="post-metadata">

**Author:** ![jimsellon](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jimsellon](https://community.sparkfun.com/u/jimsellon)\
**Post date:** [October 27, 2022, 9:42pm UTC](https://community.sparkfun.com/t/esp32-thing-compile-errors-on-ble-sketches/44587/6 "2022-10-27T21:42:51Z")

</div>

You were right. I emptied the libraries folder, reinstalled the ESP32 libraries upon startup of the IDE (2.0.1), and now the ESP32 apps compile no problem. I guess years of accumulating library files somehow got things screwed up. Thanks so much for the advice!
