Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which C++ Library for CGI Programming?

Tags:

c++

cgi

I'm looking at doing some work (for fun) in a compiled language to run some simple tests and benchmarks against php.

Basically I'd like to see what other people use for C++ CGI programming. (Including backend database, like mysql++ or something else)

like image 789
Issac Kelly Avatar asked Nov 25 '08 02:11

Issac Kelly


People also ask

What are the features of CGI library for C language CGI?

C CGI Library FeaturesDecodes and stores CGI variables in multipart/form-data format from standard input. Handles file uploads. Parses and stores HTTP cookies from the HTTP_COOKIE environment variable. Stores CGI data in lookup tables, which can be accessed directly by variable name, or accessed iteratively.

What languages can be used with CGI?

CGI applications can be written in any computer programming language that is supported by the host computer, including compiled languages such as C and FORTRAN and scripting languages such as Perl and TCL.


3 Answers

I'm not sure exactly what you're looking for, but there is a C++ web framework called wt (pronounced "witty"). It's been kept pretty much up to date and if you want robust C++ server-side code, this is probably what you're looking for.

You can check it out and read more at the wt homepage.

P.S. You may have some trouble installing wt if you don't have experience with *nix or C++ libraries. There are walkthroughs but since frameworks like these are the road less traveled, expect to hit a few bumps.

like image 87
dwlz Avatar answered Oct 02 '22 09:10

dwlz


Another option is the Cgicc library which appears to be mature (currently at version 3.x):

http://www.gnu.org/software/cgicc/

like image 39
Yukiko Avatar answered Oct 02 '22 09:10

Yukiko


If I were thinking of working at that level, I'd probably just write a straight-up Apache or IIS module instead of a CGI.

That said, if you do want to go with CGI, I'd suggest using the venerable cgic from Thomas Boutell. It's a "plain" C library, but it's been in constant use since the mid '90s so it's thoroughly tested and solid as a rock.

like image 31
Sherm Pendley Avatar answered Oct 02 '22 08:10

Sherm Pendley