C, , gnu.
, ,
gcc -o <name_of_output_file>.cgi <name_of_source_file>
Regardless of what you call the file, you need to provide the .cgi extension All you need to do is move it to the cgi-bin folder, remember to set permissions for the program, usually for cgi files that you use 755;
chmod 755 <name_of_file>
This is how I do it for C, C # I think this is the same thing.
source
share