[Lazarus] WSRegister error on console application

Vincent Snijders vsnijders at vodafonevast.nl
Mon May 4 11:23:00 CEST 2009

Andrea Mauri schreef:
> If I add Interfaces to the main unit the project compiles fine. But is 
> it ok to add interfaces to a console application?

If it can be prevented, I would not do it, but it is OK. Note that it would require 
a display on linux, for example.

> I need two LCL unit,  LCLtype and LCLintf. I use this unit in order to 
> get the mac address on windows (using netapi32.dll).

If LCLType and LCLIntf are used only on the windows OS, then I would replace them 
with the windows unit, to prevent a dependency on the LCL widgetset interface.

> uses
>   Classes, SysUtils
>   , snmp, nb30, dynlibs, LCLtype, LCLintf, LCLProc
     snmp, nb30, dynlibs, Windows, LCLProc,
>   , baseunix, sockets, users
>   {$ENDIF};

I think LCLProc can be used without the interfaces unit.


More information about the Lazarus mailing list