Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

Console Error

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antônio

The program:

program first;
{$mode objfpc}{$H+}
uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { you can add units after this };
{$R *.res}
begin
   WriteLn('This is Free Pascal and Lazarus');
   WriteLn('Press enter key to close');
   Readln;
end.

The Error Message (at runtime):

An unhandled exception occured at XXXXXXXXX
ElnOutError :File not open
XXXXXXXXX

What is going on? I have chosen Project> New Project > Program to create the project.

Lazarus 0.9.30 r29749 FPC 2.4.2 i386-win32-win32/win64

Reply by email

Martin
to Antônio
Ant?nio wrote 10 lines
The Error Message (at runtime): An unhandled exception occured at XXXXXXXXX ElnOutError :File not open XXXXXXXXX What is going on? I have chosen Project> New Project> Program to create the project. Lazarus 0.9.30 r29749 FPC 2.4.2 i386-win32-win32/win64

Does a console window open, if you run the app?
Check in the "project options" linking: The option "-WG" should *not* be checked.

If this is the problem (if it is checked), then remains the question, why it is so. Since it shouldn't be.

Martin

Reply by email

Martin
to Antônio
Ant?nio wrote
> Check in the "project options" linking: The option "-WG" should *not* be checked. Solved, thanks.

By default the switch is maintained correctly by Lazarus.

But as soon as you checked "use this compiler options as default for new projects" (while the switch was on), it will always be on, even for new console apps.

Reply by email