Arduino uno + ethernet shield

hello everybody!

i'm having a problem with my sketch... i have an uno with an ethernet shield... i made a sketch for a webserver and everything was compiling ok at work.. now i installed the arduino IDE on my home computer and i reopend my project and i tried to compile after som changes... and here i got an error that don't know how to solve...

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

i even tried the original example for the web server and it did the same thing....
i have the SPI.h included and the digital pin 4 is HIGH..
didn't find simmilar threads and i also tried 1.5.8 version of the IDE nothing worked...

Post your code. It appears there is something amiss with your Ethernet.begin() call.

the example of the webserver does not work aslo...

/*
  Web Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe
 
 */

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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,177);

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
	  client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("
");       
          }
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}

i think there is something wrong with the libraries.... this is my portion of the code..... it's the same as above but i added the gateway and subnet... everythig works on my computer at work.... i left out the other stuff because the code is so big....

#include <SFE_BMP180.h>
#include <Wire.h> 
#include "DHT.h" 
#include <Ethernet.h>
#include <SPI.h>


// Nastavitve Etherneta
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; 
byte gateway[] = { 192, 168, 10, 111 }; 
byte subnet[] = { 255, 255, 255, 0 };
IPAddress ip(192,168,10,41); 
EthernetServer server(80);


void setup() 
{
  Serial.begin(9600);
  
  
    pinMode(4, OUTPUT);
    digitalWrite(4, HIGH);
   
   Ethernet.begin(mac, ip); //(mac, ip, gateway, subnet);
   server.begin();
  
 
}

IDE 1.5.8 not working
IDE 1.6.0 not working
deleter and reinstalled everything, still no luck

That code compiles fine with IDE V1.0.6.

So does this.

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

// Nastavitve Etherneta
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; 
IPAddress ip(192,168,10,41); 
EthernetServer server(80);

void setup() 
{
  Serial.begin(9600);
  
    pinMode(4, OUTPUT);
    digitalWrite(4, HIGH);
   
   Ethernet.begin(mac, ip); //(mac, ip, gateway, subnet);
   server.begin();
}

void loop() {
}

hmmm ... it worked !! what is the difference between 1.6.0 and 1.0.x ?

THANK YOU SO MUCH FOR YOUR HELP AND QUICK RESPONSE!!!

I compiled both sketches with IDE v1.6.0 also. No problems.