Recent

Author Topic: Installation was successful but Execution stops  (Read 3345 times)

skrat

  • New member
  • *
  • Posts: 8
Installation was successful but Execution stops
« on: February 26, 2018, 02:18:58 pm »
Until now I used Lazarus in Windows environment and had absolutely no problems with it.

But not I am sort of migrating to Ubuntu 16.04. So I installed the fpc first, than fpc-src and lazarus at the end. Opened the IDE, tried to run a really simple program
Code: Pascal  [Select][+][-]
  1. program HelloWorld;
  2.  
  3. begin
  4.     writeln('Hello, world!');
  5. end.
  6.  

pressing Ctrl + F9 it compiles normally but running it (using F9) results in an error "Execution stopped".

Any idea what might be wrong? Perhaps some compiler settings?

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Installation was successful but Execution stops
« Reply #1 on: February 26, 2018, 02:35:02 pm »
Hello skrat,
Welcome to the forum.

Have you tried to start and run a 'default' empty application?
Lazarus main menu > New > Project > Application > Ok

skrat

  • New member
  • *
  • Posts: 8
Re: Installation was successful but Execution stops
« Reply #2 on: February 26, 2018, 02:46:48 pm »
I just tried it.

Error: Error while linking

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Installation was successful but Execution stops
« Reply #3 on: February 26, 2018, 03:20:37 pm »
Then it means your installation has problem.

For Ubuntu 16.04 read here to see my step-by-step installation:
http://forum.lazarus.freepascal.org/index.php/topic,39281.msg269112.html#msg269112

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9869
  • Debugger - SynEdit - and more
    • wiki
Re: Installation was successful but Execution stops
« Reply #4 on: February 26, 2018, 03:24:19 pm »
First of all, check the propper setup for debugging.
http://wiki.lazarus.freepascal.org/Debugger_Setup#Project_Options

1) NO optimization (NONE at all)
2) debug info

Also be aware that your app will terminate immediately after it wrote "Hello world" (which you do not see, see below). You do get a dialog telling you it stopped (but it does/should NOT say error)

There is a window under menu: view > Debug windows > Terminal output  (or maybe it was Console output).

This does not exist on windows. On Windows, the OS will open a terminal for your console app. On Linux that does not happen, so you only see the output in the above window.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9869
  • Debugger - SynEdit - and more
    • wiki
Re: Installation was successful but Execution stops
« Reply #5 on: February 26, 2018, 03:26:04 pm »
Have you tried to start and run a 'default' empty application?
Lazarus main menu > New > Project > Application > Ok
Then it means your installation has problem.

Not necessarily, if he put his "program" code into an "Application" then there will be some error (I would not expect linking, but ...)

skrat

  • New member
  • *
  • Posts: 8
Re: Installation was successful but Execution stops
« Reply #6 on: February 26, 2018, 04:27:30 pm »
THANKS to both of you.

Reinstalling and proper setup for debugging worked.

 

TinyPortal © 2005-2018