AVRProjectIDE with version of Arduino 1.0

Looks like you have to add:

int main()
    {
    setup();
    while (1)
        {
        loop();
        }
    }

Not sure why it's complaining about pulseIn(). Looks like it might be declared twice.