Abhinav Upadhyay
Abhinav Upadhyay

Reputation: 2585

Compiling apache modules for Windows and Linux distros

I have written an Apache2 module in C, now I am at the point of distributing the module.

I am not sure of the standard practices regarding the distribution of Apache modules, so I am considering to provide binaries for some of the more common platforms, like Windows and Ubuntu, etc.

I have two questions to ask-

  1. Will the module compiled on my Linux distro (Ubuntu 10.04) will be able to run on other Linux distros as well ? (I only have one machine so can't test it). By the way the compiled module is a shared object file.

  2. I couldn't find any reference or guide on how to compile apache modules on windows, so it would be very kind of you if you could give some heads up regarding this .

Thanks.

Upvotes: 2

Views: 2242

Answers (1)

paulusdd
paulusdd

Reputation: 56

  1. The answer is...possibly. If the apache module and the other system were compiled with a similar version of gcc then everything should be fine. If they are not the same then there is a chance for problems. It depends on the gcc version, and the options you passed in to gcc for compilation.

Someone else would be more qualified to go into specifics of how to make a binary more portable between distros.

  1. CMake is a very popular tool for compiling C code that works in windows. http://www.cmake.org/cmake/resources/software.html. You should be able to install it with apt-get.

Upvotes: 1

Related Questions