Does Harbour Produce C Code I can Use?

91 views
Skip to first unread message

Simon

unread,
Jun 15, 2010, 10:03:43 PM6/15/10
to Harbour Developers
Hi

I have been reviewing the G-Wan web server. This a free Windows/
Linux
web server which runs "C" scripts. It has a number of interesting
features in that you can use it as a socket server, web server, FTP
server and have it run tasks on a schedule or interval. It is
incredibly fast and small. However, I do not want to spend all my
time writing scripts in "C" so I thought about Harbour and I believe
I
read somewhere that the compiler could output "C" code. So I began
to
wonder whether I could write my code in Harbour and compile it to "C"
and then use the "C" files with g-wan. G-Wan compiles everything on
startup so this would mean I could write my web stuff in Harbour and
deploy it with G-Wan. So my question is it true that Harbour can
produce "C" files from the "prg" files?

Using G-Wan I would not have to create services because G-Wan can
handle all that already. All I need to do is write code and have G-
Wan call it when needed.

You can read about G-Wan at http://www.gwan.com.

Regards,
Simon White

Tamas TEVESZ

unread,
Jun 15, 2010, 11:00:20 PM6/15/10
to Harbour Developers
On Tue, 15 Jun 2010, Simon wrote:

hi,

> I have been reviewing the G-Wan web server. This a free Windows/
> Linux
> web server which runs "C" scripts. It has a number of interesting

pinky:/tmp/gwan/gwan$ ./gwan -r 0.0.0.0_8080/#0.0.0.0/csp/setheaders.c
Segmentation fault (core dumped)
pinky:/tmp/gwan/gwan$

took about two full seconds of getting to know each other.

you are probably (not probably, you are) much better off using an
established and proven thing, and plug your application in using a
proven technique (nginx and fastcgi/scgi comes to mind - well,
for that to work, a one of these modules for harbour need to be
developed, neither of which is particularly complicated).


--
[-]

mkdir /nonexistent

Simon

unread,
Jun 17, 2010, 9:58:49 AM6/17/10
to Harbour Developers
Hi

I have used "Remote Anything" another product by this developer for
years and it works very well. I have not had any problems with gwan
so I am not sure what your error is about. My main interest was that
it is much faster than anything else available and uses very little
resources to run. I get a web server, socket server, FTP server and
more in a very small efficient package. So I will be interested to
see how it matures.

However, I am still interested to know whether Harbour can produce C
code that I could use separately from Harbour itself.

Thanks,
Simon

Viktor Szakáts

unread,
Jun 17, 2010, 10:05:16 AM6/17/10
to harbou...@googlegroups.com
Hi Simon,

Harbour cannot create standalone .c code (not even
with -gc3 as someone already suggested).

It requires initialized HVM and runtime libs to do
anything useful. I'm not saying it's impossible to
integrate with gwan or anything else, but it's not
so easy easy running a .c file as if it would be a
script or native .c code.

my 2 cents.

Viktor

Alex Strickland

unread,
Jun 17, 2010, 10:19:37 AM6/17/10
to harbou...@googlegroups.com
Simon wrote:

> I have been reviewing the G-Wan web server. This a free Windows/
> Linux
> web server which runs "C" scripts.

Maybe this will interest you:

http://code.google.com/p/nativeclient/

Regards
Alex

Simon

unread,
Jun 17, 2010, 9:43:53 PM6/17/10
to Harbour Developers
Thanks that is what I wanted to know.

Simon

Simon

unread,
Jun 17, 2010, 9:44:38 PM6/17/10
to Harbour Developers
Yes I know about this and have a recent post here wondering if Harbour
will be able to be used in this environment.

Simon

Massimo Belgrano

unread,
Jun 18, 2010, 2:53:35 AM6/18/10
to harbou...@googlegroups.com
afaik there is no a magic & ready solution but if we post here any expereinces will be easy for harbour guru made a research:
other way wll be the growing of same product actualy incomplete like:
Axiomatic Multi-Platform C (AMPC) is a C compiler suite that generates Java™ bytecode. http://www.axiomsol.com/index.php

I want remember that 
Harbour today allow write web application with gci ,
harbour minigui have proposed another path called miniscript



2010/6/18 Simon <dcipherc...@gmail.com>



--
Massimo Belgrano


Reply all
Reply to author
Forward
0 new messages