Fatal Compile Error(s)
Posted: Wed Oct 08, 2025 5:44 pm
First off, Hello - it's my first post as you can see.
Second, yes I've done searches on here, and Google for several days. I'm not smart enough
to figure this out, hence my new registration on this forum!
Hardware/Software/IDE:
Expressif ESP32-S3-WROOM-1
Libraries: installed ESP32 by ExpressIF
Arduino IDE 1.8.4, and Arduino IDE 2.3.4
I've successfully connected to my ESP32-S3 (dev kit, with adapter board). The code worked,
the LED flashed, I was able to change the duration of the LED on-time, etc. So, connecting
and manipulation is fine on basic code.
Now, I'm trying to get Bluetooth to work, which I understand is only supported with BLE
library files.
I've added the "ESP32_BLE_Arduino-master" and "esp32-snippets-master" libraries.
The code and Errors as follows when selecting various "ESP32S3" options from the board menu.
Selected as:
* ESP32 Dev Module
* ESP32S3 Dev Module
* ESP32-S3-Box
Errors:
fatal error: esp_gap_ble_api.h: No such file or directory
12 | #include <esp_gap_ble_api.h> // ESP32 BLE
| ^~~~~~~~~~~~~~~~~~~
Multiple libraries were found for "BLEDevice.h"
exit status 1
Error compiling for board ESP32S3 Dev Module.
I've tried getting updates from GitHub, removing libraries, updating the IDE board manager version, etc.
Thank you in advance for any tips, suggestions, library reference, to help me get started with the ESP32!
Second, yes I've done searches on here, and Google for several days. I'm not smart enough
to figure this out, hence my new registration on this forum!
Hardware/Software/IDE:
Expressif ESP32-S3-WROOM-1
Libraries: installed ESP32 by ExpressIF
Arduino IDE 1.8.4, and Arduino IDE 2.3.4
I've successfully connected to my ESP32-S3 (dev kit, with adapter board). The code worked,
the LED flashed, I was able to change the duration of the LED on-time, etc. So, connecting
and manipulation is fine on basic code.
Now, I'm trying to get Bluetooth to work, which I understand is only supported with BLE
library files.
I've added the "ESP32_BLE_Arduino-master" and "esp32-snippets-master" libraries.
The code and Errors as follows when selecting various "ESP32S3" options from the board menu.
Selected as:
* ESP32 Dev Module
* ESP32S3 Dev Module
* ESP32-S3-Box
Code: Select all
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include <BLEService.h>
#include <BLECharacteristic.h>
BLEServer* pServer = nullptr;
BLEService* pService = nullptr;
BLECharacteristic* pCharacteristic = nullptr;
void setup() {
BLEDevice::init("ESP32_Metadata"); // Device name
pServer = BLEDevice::createServer();
pService = pServer->createService("UUID_SERVICE"); // Your service UUID
pCharacteristic = pService->createCharacteristic(
"UUID_CHARACTERISTIC", // Your characteristic UUID
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_NOTIFY
);
pService->start();
pServer->getAdvertising()->start();
}
void loop() {
// Update characteristic value with your metadata
pCharacteristic->setValue("Your Metadata Here");
pCharacteristic->notify();
delay(2000);
}fatal error: esp_gap_ble_api.h: No such file or directory
12 | #include <esp_gap_ble_api.h> // ESP32 BLE
| ^~~~~~~~~~~~~~~~~~~
Multiple libraries were found for "BLEDevice.h"
exit status 1
Error compiling for board ESP32S3 Dev Module.
I've tried getting updates from GitHub, removing libraries, updating the IDE board manager version, etc.
Thank you in advance for any tips, suggestions, library reference, to help me get started with the ESP32!