Hmm, for console application that code looks valid. Normal pascal units have code structured like this:
Code:
unit MyUnit;
interface
uses ... 
type
  ...
implementation
uses ...

code...
So for whatever reason, the compiler is treating your program as normal unit. Is it really the only file in the project, or how is it structured? What command did you use to compile it, or are you using Lazarus?