StopWatch Sample2 Example Will Not Compile--exit status 1

Here is the code:

#include <StopWatch.h>

StopWatch sw_millis;    // MILLIS (default)
StopWatch sw_micros(StopWatch::MICROS);
StopWatch sw_secs(StopWatch::SECONDS);

void setup()
{
  Serial.begin(9600);
  sw_millis.start();
  sw_micros.start();
  sw_secs.start();
}


void loop()
{
  Serial.print("sw_millis=");
  Serial.println(sw_millis.elapsed());
  Serial.print("sw_micros=");
  Serial.println(sw_micros.elapsed());
  Serial.print("sw_secs=");
  Serial.println(sw_secs.elapsed());

  delay(1000);
}

and here is the (verbose) error:

Arduino: 1.6.12 (Windows XP), Board: "Arduino/Genuino Uno"
,,,,,
Linking everything together...
"C:\Documents and Settings\Chris\Local Settings\Application Data\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p  -o "C:\DOCUME~1\Chris\LOCALS~1\Temp\arduino_build_90240/sketch_dec26a.ino.elf" "C:\DOCUME~1\Chris\LOCALS~1\Temp\arduino_build_90240\sketch\sketch_dec26a.ino.cpp.o" "C:\DOCUME~1\Chris\LOCALS~1\Temp\arduino_build_90240\libraries\StopWatch\StopWatch.cpp.o" "C:\DOCUME~1\Chris\LOCALS~1\Temp\arduino_build_90240/core\core.a" "-LC:\DOCUME~1\Chris\LOCALS~1\Temp\arduino_build_90240" -lm
collect2.exe: error: ld returned 5 exit status

Using library StopWatch in folder: C:\Documents and Settings\Chris\My Documents\Arduino\libraries\StopWatch (legacy)
exit status 1
Error compiling for board Arduino/Genuino Uno.

Note that the “Sample” file that comes with the StopWatch library compiles fine.

Can anyone see what is causing this error? I know there are lots of posts on the “exit status 1” error, but I haven’t found one that applies in this case.

If there is a post with the definitive answer to what causes this error and how to fix it, I’d be most appreciative if someone could post the link.

Thanks

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

Have you bothered to search for "Windows XP" and see all the issues related to still running a beyond end of life operating system?

Can anyone see what is causing this error?

Yes.

but I haven't found one that applies in this case.

You are not looking for the correct phrase.

If there is a post with the definitive answer to what causes this error and how to fix it, I'd be most appreciative if someone could post the link.

You want us to google that for you? Next, I suppose you'll want us to upgrade your stone age operating system, too.

You want us to google that for you? Next, I suppose you'll want us to upgrade your stone age operating system, too.

Nope. Just indicate which answer is the correct one. Downgrading the IDE seems to be the most popular suggestion. I don't know it is the correct one, but I'll try it.

Also, for those who update the IDE, if the third most commonly-used desktop operating system is no longer being supported, could you please document that somewhere and not set the IDE default to automatically check for updates.

XP is 3rd most common? What are 1 & 2 in your view? Win10 is rolling out now (into corporate world slowly, to consumers for a while now), at the corporate level Win7 still going strong for a little while more. Not sure Win8 ever caught on. Linux starting to show up now too?

XP is 3rd most common? What are 1 & 2 in your view?

Here is my source: Operating system market share

Windows 7 and 10 are 1 & 2. These statistics are for desktops, and presumably worldwide. Note that I am not making a judgement about the quality of XP, only that a lot of people still use it.

only that a lot of people still use it.

What I really can't understand is why you will stick with a 15 year old operating system, but insist on running the latest version of the IDE. Doesn't make sense to me.

What I really can't understand is why you will stick with a 15 year old operating system, but insist on running the latest version of the IDE.

This is a fair question. I don't insist on running the latest IDE, but do the updates based on the belief (perhaps incorrect belief) that bugs are being fixed that may affect me at some point. If I thought the updates were just for feature additions, I wouldn't even bother. And then there is that pesky pop-up practically begging you to update.

And when I go to the IDE download page, for example for 1.8.0, it is quite clear about what versions of OS X it works with. For Windows, it just says Windows, with no version information. So it should work with all of them, right? You say "why upgrade?", knowing the problems that may result, I say "why not?", not knowing any better. And then get results like this...

I've Googled for solutions and found four different ones that others have said worked:

  1. Delete ld.exe in the ...hardware/tools/avr/avr/bin folder
  2. Replace this file with the same one from version 1.06 of the IDE
  3. Right click on the icon that opens the IDE and select "Run this program in compatibility mode" using Windows 98/ME
  4. Select Mega 2560 as the board and compile (works fine) and then switch the board back to the Uno

I've tried all of these without success using the Uno. Anyone have any other suggestions?