[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP C++ overlay



Русаков Денис wrote:

20.09.08, 18:26, "Pierangelo Masarati" <ando@sys-net.it>:

Русаков Денис wrote:
Hello, all I'd like to ask, is it possible to write OpenLDAP overlay
in C++ language? If so could you please provide me some example of
code, g++ compile and link options? I tried to do it myself, but only
what I've got was not started slapd daemon, but if I use gcc (C
language) all is ok. Thank you, Denis
You can simply use OpenLDAP's libtool like this:
./libtool --mode=compile g++ -I include/ -I servers/slapd/ -fPIC \
	-o cxxover.lo -c cxxover.cc
./libtool --mode=link g++ -lstdc++ -module -o libcxxover.la cxxover.lo
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------

Thank you for your e-mail, but I'd like to have shared object file and write in slapd.conf something like that: moduleload mymodule.so. How could I do this?

The above actually generates a shared object file (on architectures where this is possible), which are then loaded by "moduleload yourmodule.la" in slapd.conf. See, for example, the Makefile provided in contrib/slapd-modules/smbk5pwd/.


p.


Ing. Pierangelo Masarati OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------