undefined reference to library

Digisol's picture

Hi! I have used some arduino libraries without a problem, however now I need to integrate Adafruit_BluefruitLE library in my sketch. It works sucessfully on arduino IDE, but it does not compile on UECIDE.

I have my libraries in Users\XXX\AppData\Local\UECIDE.

This is output:

• Preprocessing...
• Converting binary files
• Compiling sketch...
• Compiling core...
‣ api
• Compiling libraries...
‣ SoftwareSerial [C:\Sketches\Bluefruit\libraries\SoftwareSerial]
• Linking sketch...
C:\Sketches\Bluefruit\build\Bluefruit_combined.cpp.o: In function `setup':
c:/sketches/bluefruit/bluefruit.ino:328: undefined reference to `Adafruit_BluefruitLE_UART::begin(unsigned char, unsigned char)'
C:\Sketches\Bluefruit\build\Bluefruit_combined.cpp.o: In function `loop':
c:/sketches/bluefruit/bluefruit.ino:339: undefined reference to `Adafruit_BluefruitLE_UART::available()'
c:/sketches/bluefruit/bluefruit.ino:341: undefined reference to `Adafruit_BluefruitLE_UART::read()'
C:\Sketches\Bluefruit\build\Bluefruit_combined.cpp.o: In function `__static_initialization_and_destruction_0':
c:/sketches/bluefruit/bluefruit.ino:22: undefined reference to `Adafruit_BluefruitLE_UART::Adafruit_BluefruitLE_UART(HardwareSerial&, signed char, signed char, signed char)'
c:/sketches/bluefruit/bluefruit.ino:22: undefined reference to `Adafruit_BluefruitLE_UART::~Adafruit_BluefruitLE_UART()'
collect2.exe: error: ld returned 255 exit status
Compiling Failed"

All functions are defined, not sure what happened...

Thank you for any help you can offer.


Your sketch is referencing

Your sketch is referencing the header file OK, as it knows about the functions. However, the library itself isn't being detected and compiled.

Libraries you install yourself should really be in C:\Users\XXX\Documents\UECIDE\libraries and not in AppData. The AppData location is really for libraries installed by the plugin manager.

Digisol's picture

Hi Matt!,

Hi Matt!, Thanks again for your help!. As C:\Users\XXX\Documents\UECIDE\libraries\ folder was empty, I used the folder where I saw some libraries.

I moved my libraries into the specified folder, and everything is fine now, my library compiled perfectly!

Thank yo so much!