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

OpenLDAP backend problem

Hi again!
I have been trying to fix this new backend thusday and today(w-d) but
These are the things I've done.
1. Created a new folder for the new backend routines: slapd/back-tlwc/
2. Copied the files from slapd/back-tcl/ to this new folder, i.e.
3. Changed the names to tlwc_abandon.c e.t.c.
4. Defined the new backend in the binfo[] structure (which contains all
backend info) in
5. Defined the constant SLAPD_TLWC in ./configure file
6. Also defined the 'tlwc' backend in ./configure.in
7. Added a new project with all files in slapd/back-tlwc (+ a test main
        ie.     all tlwc_*.c files
                    external.h files
                    tlwc_back.h file (do I need to keep this one right
                    + simple test main program
8. Linked my new project to the slapd project ("shortcut" to it, so it
will be compiled)
9. Added lines in /include/portable.h.in    :
            #undef SLAPD_TLWC
            #undef SLAPD_TLWC_DYNAMIC
10. Finally I defined SLAPD_TLWC constant in /include/portable.nt files

When I had changed all '*tcl*' parts to '*tlwc*' I realized that the tcl
package depended on <tcl.h> file so I removed everything that was
defined in the header (and which I wont be needing).
I placed 2 lines on top in most functions :
    printf("inside tlwc_open");
    return 0;
...and tried to compile.

(Note that I've been trying to compile earlier but failed because of
things I then changed, see above)

I now get the following error:

--------------------Configuration: slapd - Win32
libslapd.lib(backend.obj) : error LNK2001: unresolved external symbol
Debug/slapd.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...

slapd.exe - 2 error(s), 0 warning(s)

Seems like a simple 'extern' error but when I check for the extern
declaration it is correct(/slapd/external.h) + the definition of the
function is also correct(inside /back-tlwc/tlwc_init.c).
I then tried to compare the occurances of 'tcl_back_initialize' and
'tlwc_back_initialize' and they occur at the exact same places (in the 2

Questions from a desperate backend-newbie:
1. What is wrong????         :-)
2. Exactly what files and functions are needed to create a new backend
and get hold of an
    incoming bind request with password etc.? What functions/files are
specific to the tcl backend?
3. Should I start from another (more basic) backend package when
creating my new backend?
4. Anyone that have done these things (ie. started with a certain
backend package and copied these files + defining the backend + succeded
:) ) and is willing to gimme (us?) a hint?

Very (to say the least) greatful for help.