Could not compile for arduin0/genuino uno

Arduino: 1.6.8 (Windows XP), Board: "Arduino/Genuino Uno"

collect2.exe: error: ld returned 5 exit status

exit status 1 error compiling for Board Arduino/Genuino Uno

how can i fix this?

I think the problem is the version of ld.exe included with recent versions of Arduino IDE are not compatible with Windows XP.

The most common solution(which I first saw at https://forum.arduino.cc/index.php?topic=310950.msg2282115#msg2282115) is to take the file from an older version of the Arduino IDE and replace the one in your current IDE version(located at {Arduino IDE installation folder}\hardware\tools\avr\avr\bin\ld.exe).