Error not declare in this scope

As soon as I choose arduino mega 2560

I wonder if that might be a clue.

I wonder if this is the wrong section for your question.