serial.available OK with IDE and KO with C language

phlinux:
Do you know how to use Serial in C ?

The Arduino IDE is C. What you don't see is that the IDE adds the appropriate headers to the code before passing it off to the compiler. Eclipse doesn't know to do that. So you need to include "HardwareSerial.h" yourself.