WiFiSendReceiveUDPString - Example will not compile

I am trying to run the Wi-Fi example here:-

I have downloaded the Wi-Fi library but on trying to compile the code I get a slew of errors here:-

Arduino: 1.0.5 (Mac OS X), Board: "Arduino Uno"
WiFi/WiFi.cpp.o: In function `WiFiClass::getSocket()':
/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:25: multiple definition of `WiFiClass::getSocket()'
WiFi/WiFi.cpp.o:/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:25: first defined here
WiFi/WiFi.cpp.o:/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:25: multiple definition of `WiFiClass::_server_port'
WiFi/WiFi.cpp.o:/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:25: first defined here
WiFi/WiFi.cpp.o: In function `WiFiClass::hostByName(char const*, IPAddress&)':
/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:194: multiple definition of `WiFiClass::hostByName(char const*, IPAddress&)'
WiFi/WiFi.cpp.o:/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:194: first defined here
WiFi/WiFi.cpp.o: In function `WiFiClass::status()':
/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:191: multiple definition of `WiFiClass::status()'
WiFi/WiFi.cpp.o:/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:191: first defined here
WiFi/WiFi.cpp.o: In function `WiFiClass::encryptionType(unsigned char)':
/Users/mikecook/Documents/Arduino/libraries/WiFi/WiFi.cpp:184: multiple definition of `WiFiClass::encryptionType(unsigned char)'
......................
Cut here because there are lots more of it and it exceeds the maximum size of the post.

Obviously the problem is "multiple definition of `WiFiClass::getSocket()'" this would imply a problem with the library. Anyone know a fix before I delve into the library?

I don't know what you mean by "downloaded the wifi library". The wifi library comes with the IDE. I used Ubuntu to test the compile and it did fine. IDE v1.0.5 and v1.5.5

Maybe when you added the downloaded library, it is using both copies and giving you the multiple definition error?

Maybe when you added the downloaded library, it is using both copies and giving you the multiple definition error?

No I deleted the old one when I downloaded the latest one. They might have been the same because I got the same errors before I downloaded the library.

Where did you get your IDE? Was it from the Arduino site? I have good luck with Linux 32 bit IDE v1.5.5, but I'm not using a Mac/OSX . Try downloading it from the Arduino site and give it a try with it. Just a thought...

Was it from the Arduino site?

Yes where else would you get it from?

Many other examples work ( compile ) although I have not tried them all but this will not.

The only Linux I have available is on a raspberry Pi but that is so slow I don't want to spend half an hour trying to compile it.

In my case, I can download it from a repository, but it is an old version and doesn't compile correctly.

You can get Arduino from the Raspberry Pi repository also, but it is version 1.0.1. A downloaded version from this site won't work. It complains about the ARM processor and won't start. :frowning:

Thanks,
a reinstall of the IDE did it.
Cheers