How can I write an Apache module in C++? How can I write an Apache module in C++? apache apache

How can I write an Apache module in C++?


One approach to solve this problem would be to compile the cpp file to object file and then pass that object file to the apxs tool. For example:

g++ `pkg-config --cflags apr-1` -fPIC -DPIC -c mod_example.cppapxs -i -n example_module `pkg-config --libs apr-1` -c mod_example.o