[Lazarus] Newbie, porting class to FPC but get procedure assignment error

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Tue Jun 23 10:43:00 CEST 2015

On 2015-06-22 17:14, Bo Berglund wrote:
> I tried to do what you proposed:
> File->New Console Application

That creates a Console application - thus no dependenies on GUI toolkits.

> sentinel.pas(14,3) Fatal: Cannot find unit ExtCtrls used by Sentinel.
> Check if package LCLBase is in the dependencies.
> It points to the uses clause in the Sentinel.pas file where standard
> units are mentioned like Forms, ExtCtrls etc...

So that means (so often the case with Delphi components) that
sentinel.pas depends on a GUI toolkit. Because you created a console
application, such dependencies are not allow. Often (but not always)
units like that include Forms, Dialogs, Graphics etc in the uses clause,
even though they don't actually use them.

For a dongle there shouldn't be any need for a GUI toolkit. Comment out
any GUI toolkit units in the sentinel.pas unit and try again.

> None of these complaints were issued when I used the exact same unit
> in my GUI test application.

So surprise, because your GUI application had a dependency on LCL, thus
it could find the Forms, Dialogs etc units.

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the Lazarus mailing list