[Lazarus] Built console app on Linux, but won't run on another Linux machine

Bo Berglund bo.berglund at gmail.com
Sun Oct 28 10:47:40 CET 2018

On Sun, 28 Oct 2018 00:49:50 +0200, Sven Barth via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>That something is pulling in unit Interfaces is proof that something tries
>to use GUI units. So either find out what unit that is (it could either be
>one of yours or maybe an Indy one) or try to set the LCLWidgetType to NoGUI.

This was a project option I did not know about before and then not how
to set it.
But after a bit of google use I found the way:

- open Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides

- In this dialogue there is a dropdown above the listbox named:
  Set "LCLWidgetType" drop it down and find the entry
  "Value nogui"
  and select it

- OK to the main window and select Run/Build

This will rebuild the indylaz package and then the main application,
which now starts OK also with noone logged on to the main window.

It still needs the Interfaces entry under uses, though!
But if I comment it out then it is not discovered until linking the

I always thought that options like these could be set in similar ways
as the {$mode objfpc}{$H+} in the main project file.
Maybe it is also possible? If so what is the correct syntax?
I would like to have it visible in the source if ever possible.

Bo Berglund
Developer in Sweden

More information about the Lazarus mailing list