Compiling C CGI Code For Use On www.halcyon.com: |
Q: Why won't my C program run on the web server, it runs fine on the command line?
A: The machine you compiled your program on is different than that of the web server, The code may run directly on the www.halcyon.com server but may have problems because of library incompatibilities.
So how am I supposed to compile my code then?
If the above does not work, you may want to try the following.
mkdir compile;chmod 777 compile
##### Start of "makescript" (do not include) #####
#!/bin/sh
#run make as a CGI program
echo "Content-type: text/plain"
echo ""
# if you have no makefile, use whatever commands are necessary to
# compile program instead of make
make clean
make
##### End of "makescript" (do not include) #####
chmod 755 makescript
cp myc-cgi ../cgi-pvt
rm myc-cgi; chmod 755 compile