Lazarus

Installation => Linux => Topic started by: velosox on August 13, 2020, 08:43:03 pm

Title: Run doubt on Mint
Post by: velosox on August 13, 2020, 08:43:03 pm
I had install mint, then I have this doubt to how RUN, as windows.
When I did that with wdws, was different, because most of the time I saw a pop up, with the program.
Now I just no see that, and even with compiling I can execute after.
That should be a dumb question, but I'm new in linux world, so if you guys could help I be thankfull
Title: Re: Run doubt on Mint
Post by: Martin_fr on August 13, 2020, 09:01:52 pm
Is you app 

1) GUI
  has a TForm  (and maybe buttons or label)

2) Console
  use readln and writeln

?
Title: Re: Run doubt on Mint
Post by: velosox on August 13, 2020, 09:16:12 pm
I got it.  :D
I have to execute by terminal in mint, it doesn't open by itself.
Title: Re: Run doubt on Mint
Post by: velosox on August 13, 2020, 09:17:44 pm
I had install mint, then I have this doubt to how RUN, as windows.
When I did that with wdws, was different, because most of the time I saw a pop up, with the program.
Now I just no see that, and even with compiling I can execute after.
That should be a dumb question, but I'm new in linux world, so if you guys could help I be thankfull
I got it.  :D
I have to execute by terminal in mint, it doesn't open by itself.

It's to console
Title: Re: Run doubt on Mint
Post by: Martin_fr on August 13, 2020, 09:55:46 pm
Menu: View > Debug Windows > Console ...

Afaik it should open on its own, but if not then use the menu.

The Window will show the output of your program, and if you type into the window, it will send the input to your program.

It is only a very basic console. No full terminal (like your gnome-terminal). E.g. no editing of input with arrow keys...
Title: Re: Run doubt on Mint
Post by: velosox on August 13, 2020, 11:03:59 pm
Menu: View > Debug Windows > Console ...

Afaik it should open on its own, but if not then use the menu.

The Window will show the output of your program, and if you type into the window, it will send the input to your program.

It is only a very basic console. No full terminal (like your gnome-terminal). E.g. no editing of input with arrow keys...

Good to know about this console mode!
It's weird cuz a friend of mine downloads it too and he said that his bash open.
 %)

Thank you for the help.
Title: Re: Run doubt on Mint
Post by: Martin_fr on August 13, 2020, 11:52:10 pm
Well, there are lots of ways. But none of them works for all Linux.
https://wiki.lazarus.freepascal.org/Debugger_Console_App

1)
Using gdbserver (remote debugger), but running gdbserver on the same box => should work. But you have to start gdbserver yourself.

2)
It used to be possible via menu: Run > Run Params => Launching Application
There still is a sample setup.
But afaik 99% of terminals no longer work for this. Most terminals now have a terminal server of some kind in the background. Or do some forking of processes. And then gdb want catch the project....

3)
The PTY trick from the link above... But again more work to setup

4)
LLDB
IF you have a well working lldb for Linux; and IF it supports "launch in terminal" (Tools > Options > Debugger / IF lldb package is installed).... A lot of IF. Completely untested for Linux.
Needs package LazDebuggerFpLLDB *AND* lldb (from linux repro) itself.

....
There may be more ways....

TinyPortal © 2005-2018