[fpc-devel] CGI/Command line/GUI all in one
Graeme Geldenhuys
graemeg at opensoft.homeip.net
Thu Sep 17 13:24:05 CEST 2009
Gilles MARCOU het geskryf:
> I'm trying to build an interface for a program so that it could be used
> as a command line, a GUI or a CGI. For the CGI, I use powutils 1.7.1,
> FPC 2.2.0 and Lazarus 0.9.24. I mean that the same executable should be
> used either as a CGI, a command line or a GUI.
I can't see this working - I went through the same problem with the
tiOPF project.
If you create a CGI application that pulls in the Forms unit for
example. Then try and run that CGI project thourgh a web server that
doesn't have X Window System installed, the program will fail with
"DISPLAY has not been set" error.
In the case of tiOPF. I was trying to run the console Test Suite on a
headless Linux box. I had to first clean up the tiOPF code, to NOT
include GUI units in the core tiopf unit. Then only did my console
application run correctly on the headless linux box.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/
More information about the fpc-devel
mailing list