Recent

Author Topic: Lazarus on Raspberry: no console window  (Read 2573 times)

ArminLinder

  • Sr. Member
  • ****
  • Posts: 315
  • Keep it simple.
Lazarus on Raspberry: no console window
« on: February 01, 2016, 12:00:41 am »
Hi all,

I am starting to experiment with Lazarus/FPC (latest build 0.9.30.4) on the Raspberry Pi (Wheezy). First tests using GUI (LCL) Applications looked promising. Then I tried a console application, the very sophisticated code is:

Code: Pascal  [Select][+][-]
  1. Program TestConsole;
  2.  
  3. begin
  4.   writeln('Hello World');
  5.   readln;
  6. end.

The code looks familiar, I guess :-) Please don't tell me that this problem has been solved before, and that there are libraries out there dealing with it.  >:D

Unfortunately this fine code piece won't work as expected. The program will run, I can even step through the code using the debugger, but no terminal will open. Running it from the command line doesn't produce a terminal as well.

The same sample works well on Windows.

Is there anything known about this issue?

Thanks

Armin.
Lazarus 3.3.2 on Windows 7,10,11, Debian 10.8 "Buster", macOS Catalina, macOS BigSur, VMWare Workstation 15, Raspberry Pi

Leledumbo

  • Hero Member
  • *****
  • Posts: 8768
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Lazarus on Raspberry: no console window
« Reply #1 on: February 01, 2016, 07:11:35 am »
If you run it from lazarus: Debug->Terminal Output

Welcome to Linux world where EVERY application is practically a console application, but the console isn't attached per application/process as in Windows. It's the host application that must read the standard output of the underlying application then display it in its own terminal emulator window. In Lazarus case, it's displayed in terminal output window. Outside, you must run it in a terminal (emulator).

 

TinyPortal © 2005-2018