EthernetUdp2 does not name a type I'm using arduino Ethernet shield 2 form arduino.org and the arduino IDE 1.7.10 also from arduino.org 
the code is : 

#include &lt;Dhcp.h&gt;
#include &lt;Dns.h&gt;
#include &lt;Ethernet2.h&gt;
#include &lt;EthernetClient.h&gt;
#include &lt;EthernetServer.h&gt;
#include &lt;EthernetUdp2.h&gt;
#include &lt;Twitter.h&gt;
#include &lt;util.h&gt;


#include&lt;SPI.h&gt;


EthernetUdp2 udp;
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


and it is giving the following Error : 

Arduino: 1.7.10 (Windows 8.1), Board: "Arduino Uno"

UDPMessages002.ino:14:1: error: 'EthernetUdp2' does not name a type

Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File &gt; Preferences.


after Enabling Show verbose output I got :

Arduino: 1.7.10 (Windows 8.1), Board: "Arduino Uno"

Build options changed, rebuilding all

Using library Ethernet2 in folder: C:\Program Files\ArduinoOrg\libraries\Ethernet2 

Using library SPI in folder: C:\Program Files\ArduinoOrg\hardware\arduino\avr\libraries\SPI 



C:\Program Files\ArduinoOrg/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=107010 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\ArduinoOrg\hardware\arduino\avr\cores\arduino -IC:\Program Files\ArduinoOrg\hardware\arduino\avr\variants\standard -IC:\Program Files\ArduinoOrg\libraries\Ethernet2\src -IC:\Program Files\ArduinoOrg\hardware\arduino\avr\libraries\SPI C:\Users\friend\AppData\Local\Temp\build8617491196975133384.tmp\UDPMessages002.cpp -o C:\Users\friend\AppData\Local\Temp\build8617491196975133384.tmp\UDPMessages002.cpp.o 

UDPMessages002.ino:14:1: error: 'EthernetUdp2' does not name a type

Error compiling.


any Help please 

These libraries came with the IDE and were not added by me and all the includes 
were added automatically after using Sketch --> Import Library --> Ethernet2
The error you see, 'EthernetUdp2' does not name a type, means exactly that - there is no type EthernetUdp2 defined.

If you look at the source of EthernetUdp2.h, you'll see that the class declaration is EthernetUDP. See:

class EthernetUDP : public UDP {
    private:
        // Private members...
    public:
        EthernetUDP();  // Constructor

      // Public members...

};


class EthernetUDP : public UDP defines a class called EthernetUDP that inherets from the base class UDP. The constructor is what gets called when you instantiate a new object of type EthernetUDP.

Replace the line EthernetUdp2 udp; in your code with EthernetUDP udp; and it should work because the types will match. For reference:

#include &lt;Dhcp.h&gt;
#include &lt;Dns.h&gt;
#include &lt;Ethernet2.h&gt;
#include &lt;EthernetClient.h&gt;
#include &lt;EthernetServer.h&gt;
#include &lt;EthernetUdp2.h&gt;
#include &lt;Twitter.h&gt;
#include &lt;util.h&gt;


#include&lt;SPI.h&gt;


EthernetUDP udp; // &lt;---- This works

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}