Problem with Eclipse + Serial

Hey

I want to programm my arduino nano with eclipse.
The Led blink programm runs fine, but when I want to use the Serial object I get an Error:
…/main.c: In function ‘main’:
…/main.c:9: error: ‘Serial’ undeclared (first use in this function)
…/main.c:9: error: (Each undeclared identifier is reported only once
…/main.c:9: error: for each function it appears in.)
make: *** [main.o] Error 1

my Code:
#include <WProgram.h>

int main(void) {

init();
//
/
Add your setup code here /
/
/
Serial.begin(57600);
Serial.println(“Hello world”);
pinMode(13, OUTPUT);
for (;:wink: {
digitalWrite(13, HIGH); // set the LED on
delay(2000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second

} // end for
return 0;
} // end main
Where is the failure?

Thanks, nikolausi

I want to programm my arduino nano with eclipse.

Why? The Arduino team provides a perfectly good (at least functional, most of the time) IDE for something as simple as blinking an LED.

And the failure is in your Eclipse setup - the code runs fine (but please put it in code brackets for presentation on the forum).

It could be a C++ issue, seeing as how you called your file main.c and Serial is a C++ class

PaulS:

I want to programm my arduino nano with eclipse.

Why? The Arduino team provides a perfectly good (at least functional, most of the time) IDE for something as simple as blinking an LED.

Testing a IDE setup with a "Hello World" before going on to more complicated things is perfectly understandable.

frank26080115:
It could be a C++ issue, seeing as how you called your file main.c and Serial is a C++ class

Thanks that was the Problem.