+ Reply to Thread
Results 1 to 2 of 2

Thread: C++ cgi

  1. #1
    spinnernicholas is offline x10Hosting Member spinnernicholas is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    2

    C++ cgi

    Is there anyway I can run C++ compiled cgis if I compile on windows.

  2. #2
    Submariner is offline x10Hosting Member Submariner is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    TN, USA
    Posts
    44

    Re: C++ cgi

    To run a compiled GCI program it needs to be compiled against the OS it will be running on. Since you are compiling your CGI programs on Windows they will only run on Windows servers.

    It gets a bit trickier with UNIX servers as you can complie a Linux C++ CGI program and it may or may not work on all Linux web servers if you linked your libraries dynamically (makes a smaller executible). The reason for this is your CGI program may want to load a library that is not installed on the server and the program will fail. If you don't do dynamic linking and pull in all the standard OS functions into you program is shoud run all all like servers.

    I hope this helps...

    James

    BTW, on second thought if you have a cross compiler that will generate the UNIX format code on your Windows box then you can use it to generate the program. Most don't do this, it's easier to build a box that has the same OS you want to run it on and compile there and upload to the production server.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers