Out-of-process ISAPI:
The table below gives some pointers as to how you should compile ISAPI filters. The important thing is that you compile code that is position independent, uses thread-safe libraries, and contains no unresolved symbols.
| Platform |
Compile Options |
| Linux/FreeBSD/gcc-based system |
gcc -fPIC -D_REENTRANT -Wall -c module.c gcc -shared -fPIC module.o -o module.so |
| Solaris 2.x |
cc -fast -Kpic -D_REENTRANT -c module.c ld -G module.o -o module.so |
| HPUX |
cc +z -D_REENTRANT -c module.c ld -b module.o -o module.so |
| SGI IRIX |
cc -D_SGI_MP_SOURCE -D_REENTRANT -fullwarn -c module.c ld -32 -shared module.o -o module.so |
| Compaq Tru64 |
cc -threads -D_REENTRANT -c module.c ld -shared -all -expect_unresolved \\ "*" module.o -o module.so |
| IBM AIX |
xlc -DSTDLOG -D_REENTRANT module.c -c ld module.o -bnoentry -G -bexpall -bM:SRE -lc -lpthread -o module.so |
In-process ISAPI:
The table below gives some pointers as to how you should compile ISAPIfilters. As this code is linked against the web server it is not necessary to be thread-safe. Care should be taken when linkingmultiple .o files to generate a single ISAPI - since the ISAPI isbasically a shared library then once an ISAPI extension has been loaded into the web server, any exported (i.e. global) symbols may bevisible to subsequently loaded ISAPI extensions. This depends on theoperating system.
| Platform |
Compile Options |
| Linux/FreeBSD/gcc based-system |
gcc -fPIC -c -Wall module.c gcc -shared -fPIC module.o -o module.so |
| Solaris 2.x |
cc -fast -Kpic -c module.c ld -G module.o -o module.so |
| HPUX |
cc +z +O3 +DA2.0 -c module.c ld -b module.o -o module.so |
| SGI IRIX |
cc -O2 -KPIC -c module.c cc -shared module.o -o module.so |
| Compaq Tru64 |
cc -std -O2 -trapuv -c module.c ld -shared -B symbolic module.o -o module.so -lc |
| IBM AIX |
xlc -DSTDLOG module.c -c ld module.o -bnoentry -G -bexpall -bM:SRE -lc -lpthread -o module.so |