Cgi with perl or C -

They have: 4 posts

Joined: Mar 1999

I was wondering if I can do my cgi with C. I have been using perl but I know more C. If I do use C won't I have to compile it and then can I just change the name to .cgi? Probably a silly question but I'm dyin' to know.
Tracy

John Pollock's picture

He has: 628 posts

Joined: Mar 1999

Most servers have a C compiler you can use through Telnet. I think the most common is the gcc compiler.

I save my file as filename.c and upload it to my cgi directory. Then, I go to my cgi directory through Telnet, and use the following command to make the program a cgi:

gcc-o filename.cgi filename.c

The key is to have telnet access and know what compiler the server uses.

------------------
John Pollock
http://www.pageresource.com

They have: 4 posts

Joined: Mar 1999

That was fast! Thanks. I do have telnet access and I'll try it. This should be fun.
Tracy )

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.