C Cgi

Status
Not open for further replies.

cesiumcarbon

New Member
Messages
3
Reaction score
0
Points
0
Hello, I am completely new to CGI and need guidance:

1.) Is it possible to run compiled c++ code?
2.) If so, what are the restrictions?
3.) If so, how? how would I run this code:

Code:
#include <iostream>
using namespace std;
int main()
{
    cout<<"Content-type: text/plain"<<endl<<endl;
    cout<<"Hello World!"<<endl;
 
    return 0;
}

I tried putting this in a text file, naming it to hello.cgi, then trying to run it.
I've also tried uploading the executable.
:dunno:
 
Last edited:

cesiumcarbon

New Member
Messages
3
Reaction score
0
Points
0
Thanks. I'm still not sure how to compile/get it running though. I'm interested in CGI because if it allows compiled c++ to run, then some code will run way faster than PHP.
 

Russ

<b>Retired *****</b>
Messages
3,168
Reaction score
2
Points
38
That's true. Someone should be able to help you better then with it. Good luck with it, and sorry I couldn't be more helpful on this one.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
205
Points
63
Compilers are turned off so you would have to compile it on your end first.

Besides that you'll probably just have to test it.
 

cesiumcarbon

New Member
Messages
3
Reaction score
0
Points
0
I'm on Windows so I have a windows compiler. Now that I think about it, that's obviously a reason the c cgi was not working. I looked all over the internet to find an easy way to compile for linux on windows, but the best thing I found was to either dual boot with linux or run linux virtually, then compile in linux. If there is an easier way, please let me know but if not then I'll just do this.
 
Status
Not open for further replies.
Top