Solving vfprintf.c:(.text.avr-libc+0xc8): undefined reference to ‘__mulqi3’ linking error

If you encounter the above linking error with an ATmega328p and your code uses sprintf, set your LIBRARY_PATH or the linker argument -L to /usr/lib/avr/lib/avr5 instead of /usr/lib/avr/lib.

Read the Full Article by E Y