[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Writing a slapi plugin
Hi all
I'm writing a simple slapi plugin, but i'm having trouble at the first
hurdle. I have a simple module which currently only has an init function. I
couldn't find an indication of how this should be built. I find that the
module won't load when linked against libslapi, but loads ok when not. Surely
I'll need to link against libslapi when I add some meat to the bones.
Can anybody show me what I am missing?
Regards
Andrew Bird
/* testplug.c */
#include <stdio.h>
#include "slapi-plugin.h"
int init_module(Slapi_PBlock * pb) {
fprintf(stderr,"hello\n");
return(0);
}
/* build script - Linux RH 7.2 */
gcc -c -fPIC -I ../openldap-2.2.3beta/include/ -D_REENTRANT testplug.c -o
testplug.o
ld -shared -Bsymbolic -E testplug.o -L . -lslapi -lldap -llber -lsasl2 -lssl
-lcrypto -lc -o libtestplug.so.1.0