Forum > Options

(SOLVED) Lazarus in Terminal?

(1/3) > >>

guest48180:
Is there a configuration option in the Lazarus IDE that will turn on my terminal so that a program like:

program project1;

{$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');
  Writeln('Press enter key to close');
  Readln;
end.

will show up in my terminal? I realize this is a noob question, but I'd like for this to work the same way the tutorial does  :)

CaptBill:
Your code runs fine here. You probably need to start by using a console app project template. Go to file|new and choose "console application". Now you can delete the template code and paste yours.

You are probably trying to use the "default" template that is opened when Lazarus opens, which is a full windowed app template, which is a collection of program units, not just one like you want.

Leledumbo:
http://wiki.lazarus.freepascal.org/Debugger_Console_App

guest48180:

--- Quote from: CaptBill on June 24, 2012, 05:20:55 am ---Your code runs fine here. You probably need to start by using a console app project template. Go to file|new and choose "console application". Now you can delete the template code and paste yours.

You are probably trying to use the "default" template that is opened when Lazarus opens, which is a full windowed app template, which is a collection of program units, not just one like you want.


--- End quote ---

CaptBill:  My problem, even doing as you asked me to do, is that I never see a console. My terminal never pops up for me to see the output of my efforts.

jwdietrich:
Which operating system do you want to run the program on?

On Mac OS X you have to open the terminal first. Then you can run the application by providing its full path name. Your code runs excellent on Mac OS X Leopard.

Navigation

[0] Message Index

[#] Next page

Go to full version