Compiling errors when upgrading from 1.6.5 to 1.6.13 or 1.8.0

Decided to upgrade my IDE for the UNO. Went from 1.6.5 to 1.8.0 and got compiling errors for several of my sketches. Get the same if upgrading from 1.6.5 to 1.6 .13. Compiling works fine with 1.6.5.

Errors are with or without Uno connected to the PC.
OS is WinXP.

Errors are as follows:

collect2.exe ld returned 5 exit status

Exit status 1
Error compiling for board Arduino/Genuino Uno.

The problem is caused by using XP. For more information see:
https://forum.arduino.cc/index.php?topic=310950
and

Luckily there has been some progress on this issue recently and the Arduino developers think they have found a solution. There is a test build of the fix available here:

if you test it out please report your results.

Arduino: 1.6.13 (Windows Vista), Board: "Arduino Nano, ATmega328"

C:\Users\jim\AppData\Local\Temp\arduino_build_667787\sketch\Blink.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory

#include <Arduino.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino Nano.

Then it comes up with more errors. Have tried to upgrade to 1.8.0 and still the same, was working alright with 1.5.00. Will revert back to earlier version

I think my issue is fixed and compiling with 1.8.0 on my XP box seems to be working. I did not try any of the options suggested but instead tried something that I thought would be appropriate and that was to do a clean install of the IDE.

On a hunch I uninstalled all Arduino stuff and cleaned up and deleted any references and files to Arduino.

I was running 1.6.5 from a folder on the desktop as it was installed from a zip file right to the desktop so 1.6.5 probably wasn't installed correctly to begin with so deleted that as well. Once everything related to Arduino was removed from the system I reinstalled 1.8.0 using the Windows Installer. The few sketches I had been having trouble compiling, now compile without issue, that even includes the Blink example sketch.

If anything changes I'll let you know. Thanks to those for the input.
Upsidedown.

After several days of using 1.8.0, no problems. I think the problem is licked. My suggestion is to do what I did mentioned in my previous post. Got to clean the XP system of previous versions of the IDE and reload.

It'll be back. It's sad because the Arduino developers made the effort to fix the bug but nobody will take the time to test the fix and give them feedback on whether it worked. The longer the fix goes without being merged the less likely it will ever get merged because in the meantime the code is changing and so you end up with merge conflicts. Making the Arduino IDE compatible with a retired OS is not top priority, especially if it seems the community doesn't have a real interest in the issue. Everyone likes to complain about bugs but nobody wants to take an active role in fixing them.