Cannot upload sketch! Help!

I am using an Arduino Leonardo, and I can't upload any sketches to it. The error messages:

Arduino: 1.8.0 (Windows 8.1), Board: "Arduino Leonardo"

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `write':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:225: undefined reference to `USB_Send(unsigned char, void const*, int)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `flush':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:205: undefined reference to `USB_Flush(unsigned char)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `availableForWrite':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:200: undefined reference to `USB_SendSpace(unsigned char)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `read':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:195: undefined reference to `USB_Recv(unsigned char)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `peek':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:184: undefined reference to `USB_Recv(unsigned char)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o: In function `available':

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:176: undefined reference to `USB_Available(unsigned char)'

C:\Users\Samsung\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.19\cores\arduino/CDC.cpp:178: undefined reference to `USB_Available(unsigned char)'

C:\Users\Samsung\AppData\Local\Temp\ccsVHiun.ltrans0.ltrans.o:(.rodata+0x18): undefined reference to `Print::write(unsigned char const*, unsigned int)'

c:/users/samsung/appdata/local/arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr5/crtatmega32u4.o:(.init9+0x0): undefined reference to `main'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Leonardo.

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

HELP