I'm just learning about Arduino and specifically the Ethernet library and the DHCP library I downloaded. I thought I'd copied the example of this script correctly, but i keep getting errors such as:
In file included from DHCP_Test.cpp:9:
C:\Users\Impresario\Documents\Arduino\arduino-0022\libraries\DHCP/Dhcp.h:8:29: error: utility/types.h: No such file or directory
In file included from DHCP_Test.cpp:9:
C:\Users\Impresario\Documents\Arduino\arduino-0022\libraries\DHCP/Dhcp.h:120: error: 'u_char' does not name a type
C:\Users\Impresario\Documents\Arduino\arduino-0022\libraries\DHCP/Dhcp.h:121: error: 'u_char' does not name a type
Here is the short sketch. I would be ever so grateful for any help!
#if ARDUINO > 18
#include <SPI.h>
#endif
#include <Client.h>
#include <Ethernet.h>
#include <Server.h>
#include <Udp.h>
#include "Dhcp.h"
byte mac[] = { 0x90, 0xA2, 0xDA, 0x00, 0x50, 0xDD };
// IP addressing automatic
byte server[] = { 209, 85, 229,104}; // Google
Client client(server, 80);
void setup()
{
Serial.begin(9600);
if(Dhcp.beginWithDHCP(mac) == 1) // begin method returns 1 if successful
{
Serial.println("got IP address, connecting...");
delay(5000);
}
else
{
Serial.println("unable to acquire ip address!");
while(true) ; // do nothing
}
if (client.connect())
{
Serial.println("connected");
client.println("GET /search?q=arduino HTTP/1.0");
client.println();
}
else
{
Serial.println("connection failed");
}
}
void loop()
{
if (client.available())
{
char c = client.read();
Serial.print(c);
}
if (!client.connected())
{
Serial.println();
Serial.println("disconnecting.");
client.stop();
for(;

;
}
}