Doesn't Compile

I keep trying to compile a sketch, but the same error keeps on showing up:
"
Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Uno"

C:\Users\mateo\AppData\Local\Temp\build4687673022135353463.tmp/core.a(wiring.c.o): In function delay': C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/wiring.c:114: undefined reference to yield'
collect2.exe: error: ld returned 1 exit status
Error compiling.
"
How do I fix this and what could I do to prevent this from happening again?

Having never experienced this error I cannot give you a definite answer. However, two suggested "fixes" for this error can be found here.

Good Luck.

Please post your code , Based on which we can tell issue

void() is declared in Arduino.h and defined in hooks.c. It looks like hooks.c is not being included in the build.

Sometimes it helps to delete or rename the old Arduino15 directory (from 1.5.x) and re-installing 1.6.4.

On Mac OS X:
/Users/username/Library/Arduino15

On Windows:
C:\Users\username\AppData\Roaming\Arduino15