Why does my ISAPI module fail to load?

There are two likely causes. One is that your module is not properlycompiled as a position independent shared object. The other isthat it contains unresolved symbols. Unresolved symbol errorsoften get put on standard error by the dynamic linker.Unfortunately, there is no easy way the webserver can grab this dataoff standard error to report it to you. The following test codemay help you debug any problems.

#include <stdio.h>#include <dlfcn.h>main( int argc, char **argv ){   char *dll = argv[1];  void *handle;  if( argc != 2 ) {    printf( "Usage: %s \n", argv[0] );     exit( 1 );   }  handle = dlopen( argv[1], RTLD_NOW );   if( !handle ) {     char *err = dlerror();     if( err == 0 ) err = "OS didn't give an error message";     printf( "dlopen failed, reason given by OS: '%s'\n", err );     exit( 2 );  }  printf( "DLL loaded ok\n" ); }

This should compile with almost any C compiler.  You may need tolink with "-ldl".  See your dlopenman page for further information.

Content Manager [Administrator] 19 September 2005  Permalink  
Download Free Trial

Recent Articles

Other Resources



www.zeus.com