Reply To: Error compiling for board?

#19923

Justin
Participant

I was having the same issue then I figured out how to install the file into the library but now I get all kinds of errors.

Arduino: 1.6.12 (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::initHWSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::initI2C(_u8g_dev_t*, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::init8Bit(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::init8BitFixedPort(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\U8glib.cpp.o (symbol from plugin): In function `U8GLIB::initSPI(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’:

(.text+0x0): multiple definition of `U8GLIB::initRW8Bit(_u8g_dev_t*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)’

sketch\U8glib.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.