Skip to content

Instantly share code, notes, and snippets.

@kd8bxp
Created January 6, 2018 18:33
Show Gist options
  • Save kd8bxp/989d0cf3c84abbfdbee1882ed7333015 to your computer and use it in GitHub Desktop.
Save kd8bxp/989d0cf3c84abbfdbee1882ed7333015 to your computer and use it in GitHub Desktop.
Arduino 1.8.4 and 1.8.5 compile errors for ESP32 BLE libraries (ESP-Alerts-For-Arduino) on Linux Mint 18.3 (64bit)
Archiving built core (caching) in: /tmp/arduino_cache_867389/core/core_espressif_esp32_lolin32_FlashFreq_80,UploadSpeed_921600_e9bab7561037436f3da11df45f0a1c0e.a
sketch/esp32_android.ino.cpp.o:(.literal._ZN29DisplayCharacteristicCallback7onWriteEP17BLECharacteristic[DisplayCharacteristicCallback::onWrite(BLECharacteristic*)]+0x14): undefined reference to `BLECharacteristic::getValue[abi:cxx11]()'
Multiple libraries were found for "Wire.h"
sketch/esp32_android.ino.cpp.o:(.literal._ZN29DisplayCharacteristicCallback7onWriteEP17BLECharacteristic[DisplayCharacteristicCallback::onWrite(BLECharacteristic*)]+0x18): undefined reference to `BLECharacteristic::getUUID()'
Used: /home/lfmiller/Arduino/hardware/espressif/esp32/libraries/Wire
Not used: /home/lfmiller/Arduino/libraries/Wire
sketch/esp32_android.ino.cpp.o:(.literal._ZN29DisplayCharacteristicCallback7onWriteEP17BLECharacteristic[DisplayCharacteristicCallback::onWrite(BLECharacteristic*)]+0x1c): undefined reference to `BLEUUID::toString[abi:cxx11]()'
sketch/esp32_android.ino.cpp.o:(.literal._ZN29DisplayCharacteristicCallbackD5Ev[DisplayCharacteristicCallback::~DisplayCharacteristicCallback()]+0x4): undefined reference to `BLECharacteristicCallbacks::~BLECharacteristicCallbacks()'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x10): undefined reference to `BLEDevice::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x14): undefined reference to `BLEDevice::createServer()'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x18): undefined reference to `BLEServer::setCallbacks(BLEServerCallbacks*)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x1c): undefined reference to `BLEServer::createService(BLEUUID, unsigned int)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x24): undefined reference to `BLECharacteristic::BLECharacteristic(BLEUUID, unsigned int)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x28): undefined reference to `BLECharacteristic::setCallbacks(BLECharacteristicCallbacks*)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x2c): undefined reference to `BLEService::addCharacteristic(BLECharacteristic*)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x30): undefined reference to `BLEService::start()'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x34): undefined reference to `BLEServer::getAdvertising()'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x38): undefined reference to `BLEAdvertising::setAppearance(unsigned short)'
sketch/esp32_android.ino.cpp.o:(.literal._Z14setupBLEServerv+0x3c): undefined reference to `BLEAdvertising::start()'
sketch/esp32_android.ino.cpp.o:(.literal.startup._GLOBAL__sub_I_connected+0x18): undefined reference to `BLEUUID::BLEUUID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
sketch/esp32_android.ino.cpp.o: In function `DisplayCharacteristicCallback::onWrite(BLECharacteristic*)':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLECharacteristic::getValue[abi:cxx11]()'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLECharacteristic::getUUID()'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEUUID::toString[abi:cxx11]()'
sketch/esp32_android.ino.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLECharacteristicCallbacks::~BLECharacteristicCallbacks()'
sketch/esp32_android.ino.cpp.o: In function `setupBLEServer()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEDevice::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
sketch/esp32_android.ino.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEDevice::createServer()'
sketch/esp32_android.ino.cpp.o: In function `setupBLEServer()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEServer::setCallbacks(BLEServerCallbacks*)'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEServer::createService(BLEUUID, unsigned int)'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLECharacteristic::BLECharacteristic(BLEUUID, unsigned int)'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLECharacteristic::setCallbacks(BLECharacteristicCallbacks*)'
sketch/esp32_android.ino.cpp.o: In function `DisplayCharacteristicCallback::DisplayCharacteristicCallback()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEService::addCharacteristic(BLECharacteristic*)'
sketch/esp32_android.ino.cpp.o: In function `setupBLEServer()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEService::start()'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEServer::getAdvertising()'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEAdvertising::setAppearance(unsigned short)'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEAdvertising::start()'
sketch/esp32_android.ino.cpp.o: In function `_GLOBAL__sub_I_connected':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEUUID::BLEUUID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEUUID::BLEUUID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
sketch/esp32_android.ino.cpp.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()':
/tmp/arduino_modified_sketch_661563/esp32_android.ino:218: undefined reference to `BLEUUID::BLEUUID(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
sketch/esp32_android.ino.cpp.o:(.rodata._ZTV29DisplayCharacteristicCallback[vtable for DisplayCharacteristicCallback]+0x10): undefined reference to `BLECharacteristicCallbacks::onRead(BLECharacteristic*)'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board WEMOS LOLIN32.
@kd8bxp
Copy link
Author

kd8bxp commented Jan 6, 2018

Found Issue - had another BLE library installed that was causing problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment