Compiling

Groundwork provides a script groundwork-config that can help when compiling groundwork-based CGI's or apache modules.

Compiling CGI's

To compile a .C file to object code that will be used to build a CGI, use the following command.

g++ `groundwork-config --cflags` -c file.C

To link object code together into a CGI use the following command.

g++ -o file.cgi file.o `groundwork-config --libs`
Compiling Apache Modules

To compile a .C file to object code that will be used to build an Apache Module, use the following command.

g++ `groundwork-config --apache-cflags` -c file.C

To link object code together into an Apache Module, use the following command.

ld -G -o mod_file.so file.o `groundwork-config --apache-libs`