Lazarus Console lazarus / 13-General ---------------------------------------------------------------------- Curious · 2007-02-24 20:12 Can anyone tell me,how to compile programs through console in Lazarus?I mean,i want to write progs in GUI(i'm using Windows) and when i push run it would compile in commander(output text etc). Such are requirements in my university,but i can't figure it out how to do it.Or there's some another way? ---------------------------------------------------------------------- felipemdc · 2007-02-24 21:40 Reading your text it´s a little bit hard to understand what you need. Can you explain better? What kind of information needs to be output as console text? Depending on what you need, adding {$apptype console} to the main lazarus file and recompiling Lazarus might be enougth. ---------------------------------------------------------------------- Curious · 2007-02-24 22:11 Lets say for example... Code: [Select] begin  writeln('Hello!'); end I need to see word Hello in commander(if needed ofcourse execute there also). But when i choose New->Program and type that code line in between 'begin' and 'end' ofcourse error occurs,because for my understanding Lazarus is more OOP,not console type(as was Turbo Pascal),so you need to create Form etc,put there Label and only then by binding it all together you'll get result.Or am i wrong? Simply such are requirements and i only used to OOP(only beginner ofcourse),so can't find how to do the same,only in console mode. ---------------------------------------------------------------------- felipemdc · 2007-02-25 06:16 Ah ... that´s trivial to solve. You only need to set apptype to console. Like this: Code: [Select] program myprogram; {$apptype console} uses   SysUtils; var   s: string; begin   WriteLn('Hello');   { Windows will close the console too quickly, we need an extra code     to keep it open on the end of the application }   WriteLn('Press ENTER to finish the application');   ReadLn(s); end.