Ethernet shield / code not working in 1.6 IDE

Can you please assist…

I was successfully running on 1.06 the following test to output a tweet tho my twitter account. Under the new IDE 1.6, the code (see below) will not compile. It appears to be hung up on the line of "Ethernet.begin:… "

Here’s the code…

#include <SPI.h>
#include <Ethernet.h>
#include <Twitter.h>

byte mac = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC address for ethernet shield
IPAddress ip(192,168,1,15); // LAN IP address
IPAddress gateway(192,168,1,1); // internet access via router
IPAddress subnet(255,255,255,0); // subnet mask

Twitter twitter(“xxx”); // twitter token
char tweetText[140];

int someData;

void setup() {
delay(5000);
Ethernet.begin(mac, ip, gateway, gateway, subnet); // set up connection

Here are the error messages:

C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp: In member function ‘void EthernetClass::begin(uint8_t*, IPAddress, IPAddress, IPAddress, IPAddress)’:
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:65:39: error: no matching function for call to ‘W5100Class::setIPAddress(IPAddress::&)’
W5100.setIPAddress(local_ip._address);
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:65:39: note: candidate is:
In file included from C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:392:6: note: void W5100Class::setIPAddress(uint8_t*)
void W5100Class::setIPAddress(uint8_t _addr) {
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:392:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t
{aka unsigned char*}’
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:66:38: error: no matching function for call to ‘W5100Class::setGatewayIp(IPAddress::&)’
W5100.setGatewayIp(gateway._address);
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:66:38: note: candidate is:
In file included from C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:368:6: note: void W5100Class::setGatewayIp(uint8_t*)
void W5100Class::setGatewayIp(uint8_t _addr) {
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:368:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t
{aka unsigned char*}’
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:67:38: error: no matching function for call to ‘W5100Class::setSubnetMask(IPAddress::&)’
W5100.setSubnetMask(subnet._address);
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:67:38: note: candidate is:
In file included from C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\Ethernet.cpp:1:0:
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:376:6: note: void W5100Class::setSubnetMask(uint8_t*)
void W5100Class::setSubnetMask(uint8_t _addr) {
^
C:\Users\AdrianLeno\Documents\Arduino\libraries\Ethernet\utility/w5100.h:376:6: note: no known conversion for argument 1 from ‘IPAddress::’ to 'uint8_t
{aka unsigned char*}’
Error compiling.

In the folder “C:\Users<user>\Documents\Arduino\libraries” are the custom libraries.
The Ethernet is a standard library in the Arduino system libraries.
What did go wrong ? Why is a standard library in your custom library folder ?

Excellent question, Peter_n. I had old copies of the Ethernet and SPI libraries hanging around and these were the ones that the IDE was picking up. Once I removed them, the code works again. Many thanks for pointing me in the right direction!