Ethernet localIP error

The Ethernet library is supplied with the IDE. I just copied your code into IDE 1.0 and it compiled ok.

Which version of the IDE are you using?