Hi Jantje
For Eclipse we include the .h file with the references to setup and loop and any functions we use. Which btw is neat programming as far as I am concerned
In the Arduino we can skip all this.
And a couple of my customers just want the sketch and that's it. So now I solve it this way:
#ifdef __IN_ECLIPSE__
#include "test.h"
#endif
Then it always works