Library can't find standar libraries

In a custom library I must use the Ethernet library, but if i try to use #include <Ethernet.h> the compiler can’t find the library.
What could be the error?

Thanks for help

I'm not sure what you mean by using the Ethernet library "in a custom library". You should be able to see the Ethernet library in the libraries subdirectory off the root directory where you installed the IDE. If not, you may want to do another install or at least download the library again to that directory.

Hi jgvillanueva

Can you turn on verbose mode in the IDE Preferences, then copy and paste the error messages you are getting. Please use code tags (the </> button on the toolbar when you write a post).

Regards

Ray

Oh!, I’m sorry.
This is the compilation result:

In file included from WebConnection_test_01.ino:2:0:
/Users/jorge/Documents/Arduino/libraries/WebConnection/WebConnection.h:13:22: fatal error: Ethernet.h: No such file or directory
 #include <Ethernet.h>
                      ^
compilation terminated.
Error de compilación

And in the code of the library only have the

#include <Ethernet.h>

In the sketch I have only the #include for my custom library. I need to put the #include <Ethernet.h> in the sketch too?

Yes, try the include in your program too.

ADDED You may need to include <SPI.h> as well.

Thanks!
now it is working

The Arduino IDE builds a sketch by copying all the files it thinks it needs into a temporary directory and compiling there. If you don't #include in your sketch file it won't copy the library to the compile directory.

This means each sketch effectively declares all the libraries it uses directly or indirectly.