[Lazarus] Hello World program generates a File Not Open runtime error

Sven Barth pascaldragon at googlemail.com
Sun Jan 29 15:35:39 CET 2012


On 29.01.2012 15:31, Antônio wrote:
> program project1;
>
> {$mode objfpc}{$H+}
>
> uses
>    {$IFDEF UNIX}{$IFDEF UseCThreads}
>    cthreads,
>    {$ENDIF}{$ENDIF}
>    Classes
>    { you can add units after this };
>
> begin
>    WriteLn('Hello World');
>    ReadLn();
> end.
>
> Any problem? Am I missing something?

Are you on Windows? Then you must add "{$apptype console}".

Regards,
Sven





More information about the Lazarus mailing list