[Lazarus] Web Module not works on Linux
Sven Barth
pascaldragon at googlemail.com
Sat Nov 20 14:03:12 CET 2010
On 20.11.2010 13:44, silvioprog wrote:
> 2010/11/20 Sven Barth <pascaldragon at googlemail.com
> <mailto: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.
> -------
>
And now I know why I don't use the IDE support for my CGI application...
In that case maybe Michael should continue the discussion as he's one of
the Free Pascal CGI gurus ^^
> 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:
I'd say it's discouraged. You should use fpImage to do graphics in a
non-visual application.
Regards,
Sven
More information about the Lazarus
mailing list