[Lazarus] ERROR in a simple console app
Marcos Douglas
md at delfire.net
Sat Jan 15 13:42:23 CET 2011
On Sat, Jan 15, 2011 at 10:27 AM, Henry Vermaak <henry.vermaak at gmail.com> wrote:
> On 15 January 2011 12:22, Marcos Douglas <md at delfire.net> wrote:
>> Guys,
>>
>> I tried to run an app, converted from Delphi, and I found some errors...
>> So, I tried to run a simple app and I found errors too.
>>
>> The code (copy here http://wiki.lazarus.freepascal.org/Console_Mode_Pascal):
>> 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.
>>
>> When I run inside Lazarus, happen this error:
>> Project project1.exe raised exception class 'RunError(103)'
>>
>> When I run in line command, happen this error:
>> An unhandled exception occurred at $0040155B :
>> EInOutError : File not open
>> $0040155B main, line 10 of project1.lpr
>
> Did you actually create a new console application in lazarus? Make
> sure that the Project Options -> Linking -> Win32 gui application is
> not ticked.
You got it.
But I think this is a bug... I chose File->New->Program i.e. "Console App".
Thanks
Marcos Douglas
More information about the Lazarus
mailing list