How to program the ARDUINO with ECLIPSE?

I tried some tutoriels i found but i always come across an error :
eclipse doesn't contain the arduino libraries and i can't link them to it.

i'm looking for a good tutoriel step by step on how to configure eclipse to make arduino(mega2560) work?

Have you tried Sloeber ?

Case one : You don't know how to use Eclipse :

Begin to learn or use Sloeber.

Sloeber is a degraded use of Eclipse: it is a copy of the IDE, you will not exploit all the possibilities of Eclipse.

In this case the arduino IDE is a better choice.

Case two : you have soon use Eclipse.
Consider all files inside /arduino/hardware/arduino/avr/cores/arduino as a library.
you can create a static library.