Problems with includes using Eclipse as IDE

Hello,

I am trying to use my Arduino with the Eclipse IDE but somehow I am not able to use the command #include <LiquidCrystal.h>

A simple example like Blink works just fine, but if I try to compile the following little code, I got an error.

#include "WProgram.h"

#include <LiquidCrystal.h>

int main(void) {

  /* Must call init for arduino to work properly */
  init();

  /****************************/
  /* Add your setup code here */
  /****************************/
  pinMode(13, OUTPUT);
  LiquidCrystal lcd(7, 5, 4, 3, 2, 1);

  for (;;) {

    /****************************/
    /*** write main loop here ***/
    /****************************/
	digitalWrite(13, HIGH);   // set the LED on
	delay(200);              // wait for a second
	digitalWrite(13, LOW);    // set the LED off
	delay(200);              // wait for a second

  } // end for

} // end main

As Error I get

expected '=', ',', ';', 'asm' or 'attribute' before 'lcd'

Has anyone any idea what is going on?

From looking at the syntax for LiquidCrystal() it looks like your line should be:

LiquidCrystal(7, 5, 4, 3, 2, 1);

instead of:

LiquidCrystal lcd(7, 5, 4, 3, 2, 1);

Nope, this should be correct. Works fine with the Arduino IDE tough...

Any other idea?

is the file main.c or main.cpp ? My first though was that it looks like the errors I get if I try to compile a C++ file with the C compiler.

If that's not it someone more familiar will have to help you out.