[Lazarus] Web Module not works on Linux

silvioprog silvioprog at gmail.com
Sat Nov 20 13:44:46 CET 2010


2010/11/20 Sven Barth <pascaldragon at googlemail.com>

>
> That's just a coincidence. Don't use unit interfaces in non GUI
> applications.


Hm..., the default code of a new Web Module is (File | New... | Web Module):

-------
program Project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  *Interfaces*, // this includes the LCL widgetset
  Forms, Unit1;

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TFPWebModule1, FPWebModule1);
  Application.Run;
end.
-------


> I've looked at that method. It does not rely on any visual code, so I'd
> suggest you to move those methods that don't use any GUI related code (e.g.
> dialogs, etc) to another unit where only units from RTL and FCL are
> included. This unit can then be used within your CGI application without
> problems.


Then is not possible use the Graphics unit in CGI module? D:


> Regards,
> Sven


-- 
Silvio Cl├ęcio,
*programmer* *ObjectPascal*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20101120/203257df/attachment-0003.html>


More information about the Lazarus mailing list