Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Building LDAP C SDK under Windows XP to write C Code in VisualStudio2010

83 views
Skip to first unread message

TheBesciak

unread,
Apr 13, 2011, 9:25:03 AM4/13/11
to
I have a problem building the ldap c sdk.

Here what i did allready:

Installed Microdsoft Visual Studio Ultimate
Downloaded Mozilla Build from
http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
Downloaded nss-3.12.9-with-nspr-4.8.7.tar.gz and unzipped
Downloaded cyrus-sasl-2.1.22 and unzipped
Downloaded mozldap-6.0.7.tar.gz and unzipped


Installed Mozilla Build under C:\mozilla-build
changed to Directory C:\mozilla-build\msys\bin\mozilla and i throw inside
the content of the unzipped nss-3.12.9-with-nspr-4.8.7.tar.gz (dbm, nsprpub,
security)

made in the C:\mozilla-build\msys\bin\mozilla a "directory" folder and
changed to this folder (C:\mozilla-build\msys\bin\mozilla\directory) and put
the content of the unzipped mozldap-6.0.7 inside (c-sdk (folder),
ldapsdk.mk, ldapsdk.mak)

The cyrus-sasl-2.1.22 folder i have extract under C:\cyrus-sasl-2.1.23 an
downloaded the plugins_NTMakefile.patch and utils_NTMakefile.patch and throw
them inside this cyrus-sasl folder.

Started the start-msvc10.bat which opens a MINGW32 Command Line
changed to C:\cyrus-sasl-2.1.23 and patched like described under
https://wiki.mozilla.org/LDAP_C_SDK_SASL_Windows

Administrator@XP_VM_MAC /c/cyrus-sasl-2.1.23
$ patch -p0 < plugins_NTMakefile.patch
patching file plugins/NTMakefile

Administrator@XP_VM_MAC /c/cyrus-sasl-2.1.23
$ patch -p0 < utils_NTMakefile.patch
patching file utils/NTMakefile

After that i started the Command Line from Visual Studio under
Start->Programs->Microsoft Visual Studio 2010->Visual Studio Tools
i changed to the C:\cyrus-sasl-2.1.23 folder and did:

nmake /f NTMakefile

and after that

nmake /f NTMakefile install

This runned without Errors and now i had a new Folder under C:\CMU like
discribed (https://wiki.mozilla.org/LDAP_C_SDK_SASL_Windows):

This will install the redistributable package in C:\CMU

CMU\include - header files
CMU\lib - libsasl.lib needed at build time
CMU\bin - libsasl.dll and manifest needed at run time, other executables
CMU\bin\sasl2 - plugins - saslANONYMOUS.dll, saslCRAMMD5.dll,
saslDIGESTMD5.dll, saslLOGIN.dll, saslPLAIN.dll

Than i started the start-msvc10.bat again and changed to
C:\mozilla-build\msys\bin\mozilla\security\nss and :

make nss_build_all

I saw no Errors and i had a new folder under
C:\mozilla-build\msys\bin\mozilla called "dist" in this folder where other
folders:

private
public
WINNT5.1_DBG.obj

After that i changed to C:\mozilla-build\msys\bin\mozilla\directory\c-sdk
and started to configure:

Administrator@XP_VM_MAC /c/mozldap-6.0.7/c-sdk
$
./configure --with-nss --with-nspr --with-sasl-inc=C:/CMU/include/sasl --with-sasl-lib=C:/CMU/lib
--enable-clu

the output in the command line was:

Administrator@XP_VM_MAC /c/mozilla-build/msys/bin/mozilla/directory/c-sdk
$
./configure --with-nss --with-nspr --with-sasl-inc=C:/CMU/include/sasl --with
-sasl-lib=C:/CMU/lib --enable-clu
loading cache ./config.cache
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking build system type... i686-pc-mingw32
checking for cl... (cached) cl
checking for --with-svrcore... no
checking for --with-nss... yes
checking for --with-nss-inc... no
checking for --with-nss-lib... no
checking using in-tree NSS from ../../dist/public/nss
../../dist/WINNT5.1_DBG.OB
J/lib... yes
checking for --with-nspr... yes
checking for --with-nspr-inc... no
checking for --with-nspr-lib... no
checking checking for in-tree NSPR from ../../dist... yes
checking for lib... (cached) 1
checking for --with-sasl... no
checking for --with-sasl-inc... using C:/CMU/include/sasl
checking for --with-sasl-lib... using C:/CMU/lib
checking for getaddrinfo... (cached) no
checking for getaddrinfo in -lsocket... (cached) no
checking for sasl_client_init in -lsasl2... (cached) no
checking for sasl_client_init in -lsasl... (cached) no
creating ./config.status
creating Makefile
creating config/Makefile
creating config/autoconf.mk
creating ldap/Makefile
creating ldap/clients/tools/Makefile
creating ldap/include/Makefile
creating ldap/libraries/Makefile
creating ldap/libraries/libldap/Makefile
creating ldap/libraries/libprldap/Makefile
creating ldap/libraries/libldif/Makefile
creating ldap/libraries/liblber/Makefile
creating ldap/libraries/libiutil/Makefile
creating ldap/libraries/libssldap/Makefile
creating ldap/libraries/libutil/Makefile

Then i made the make command and it started
But then abbort, here the output (i hope you can read this because it is a
German command line):

Administrator@XP_VM_MAC /c/mozilla-build/msys/bin/mozilla/directory/c-sdk
$ make
cd config; make BUILD_DEBUG=optimize export
make[1]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/c
onfig'
make[1]: Nothing to be done for `export'.
make[1]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/co
nfig'
cd ldap; make BUILD_DEBUG=optimize export
make[1]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap'
cd include; make BUILD_DEBUG=optimize export
make[2]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/include'
nsinstall -D ../../../../dist/public/ldap
nsinstall -D ../../../../dist/public/ldap-private
nsinstall -R -m 644 ./disptmpl.h ./lber.h ./ldap.h ./ldap-extension.h
./ldap-pl
atform.h ./ldap-to-be-deprecated.h ./ldap-deprecated.h ./ldap_ssl.h
./ldappr.h .
/ldif.h ./iutil.h ./srchpref.h ../../../../dist/public/ldap
nsinstall -R -m 644 ./../libraries/libldap/ldap-int.h
./../libraries/liblber/lb
er-int.h ./portable.h ./ldaprot.h ./ldaplog.h
../../../../dist/public/ldap-priva
te
make[2]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/include'
cd libraries; make BUILD_DEBUG=optimize export
make[2]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/libraries'
cd liblber; make BUILD_DEBUG=optimize export
make[3]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/libraries/liblber'
nsinstall -R -m 444 ./nslber32v60.lib ../../../../../dist/lib
make[3]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/libraries/liblber'
cd libldif; make BUILD_DEBUG=optimize export
make[3]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/libraries/libldif'
nsinstall -R -m 444 ./nsldif32v60.lib ../../../../../dist/lib
nsinstall -R -m 444 ./nsldif32v60.lib ../../../../../dist/lib
nsinstall -R -m 444 ./nsldif32v60.dll ../../../../../dist/lib
nsinstall -R -m 444 ./nsldif32v60.dll ../../../../../dist/bin
make[3]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/libraries/libldif'
cd libiutil; make BUILD_DEBUG=optimize export
make[3]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/libraries/libiutil'
nsinstall -R -m 444 ./nsiutil32v60.lib ../../../../../dist/lib
make[3]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/libraries/libiutil'
cd libldap; make BUILD_DEBUG=optimize export
make[3]: Entering directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/l
dap/libraries/libldap'
======= making ./nsldap32v60.dll
link -DYNAMICBASE -OUT:"nsldap32v60.dll" -MAP -nologo -DLL -SUBSYSTEM:WINDOWS
-
SUBSYSTEM:CONSOLE wsock32.lib kernel32.lib user32.lib gdi32.lib
winspool.lib c
omdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib rpcrt4.lib
uuid.lib
winmm.lib ../../../../../dist/lib/nsldif32v60.lib
../../../../../dist/lib/nslber
32v60.lib -LC:/CMU/lib -out:"nsldap32v60.dll" ./abandon.obj ./add.obj
./authzid
ctrl.obj ./bind.obj ./cache.obj ./charray.obj ./charset.obj ./compare.obj
./comp
at.obj ./control.obj ./countvalues.obj ./delete.obj ./disptmpl.obj
./dsparse.obj
./error.obj ./extendop.obj ./free.obj ./freevalues.obj ./friendly.obj
./getattr
.obj ./getdn.obj ./getdxbyname.obj ./geteffectiverightsctrl.obj
./getentry.obj .
/getfilter.obj ./getoption.obj ./getvalues.obj ./memcache.obj ./message.obj
./mo
dify.obj ./open.obj ./os-ip.obj ./proxyauthctrl.obj ./psearch.obj
./pwmodext.obj
./pwpctrl.obj ./referral.obj ./regex.obj ./rename.obj ./request.obj
./reslist.o
bj ./result.obj ./saslbind.obj ./sbind.obj ./search.obj ./setoption.obj
./sort.o
bj ./sortctrl.obj ./srchpref.obj ./tmplout.obj ./ufn.obj ./unbind.obj
./unescape
.obj ./url.obj ./userstatusctrl.obj ./utf8.obj ./vlistctrl.obj ./whoami.obj
./sa
slio.obj ./dllmain.obj
/mozock.obj -DEF:c:/mozilla-build/msys/bin/mozilla/dire
ctory/c-sdk/ldap/libraries/msdos/winsock/nsldap32.def wsock32.lib
kernel32.lib u
ser32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib
oleaut32.lib rpcrt4.lib uuid.lib winmm.lib
../../../../../dist/lib/nsldif32v60.
lib ../../../../../dist/lib/nslber32v60.lib -LC:/CMU/lib
LINK : warning LNK4044: Nicht erkannte Option /LC:/CMU/lib; wird ignoriert.
LINK : warning LNK4044: Nicht erkannte Option /LC:/CMU/lib; wird ignoriert.
c:/mozilla-build/msys/bin/mozilla/directory/c-sdk/ldap/libraries/msdos/winsock/n
sldap32.def(39) : warning LNK4017: DESCRIPTION-Anweisung wird von der
Zielplattf
orm nicht unterstützt; wird ignoriert.
Bibliothek "nsldap32v60.lib" und Objekt "nsldap32v60.exp" werden
erstellt.
getoption.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__
imp__sasl_getprop" in Funktion "_ldap_get_option@12".
saslbind.obj : error LNK2001: Nicht aufgelöstes externes Symbol
"__imp__sasl_get
prop".
saslio.obj : error LNK2001: Nicht aufgelöstes externes Symbol
"__imp__sasl_getpr
op".
open.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp__
sasl_client_init" in Funktion "_nsldapi_initialize_defaults".
open.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp__
sasl_set_alloc" in Funktion "_nsldapi_initialize_defaults".
open.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp__
sasl_set_mutex" in Funktion "_nsldapi_initialize_defaults".
request.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__im
p__sasl_dispose" in Funktion "_nsldapi_free_connection".
saslio.obj : error LNK2001: Nicht aufgelöstes externes Symbol
"__imp__sasl_dispo
se".
saslbind.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__i
mp__sasl_client_step" in Funktion "_nsldapi_sasl_do_bind".
saslbind.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__i
mp__sasl_errdetail" in Funktion "_nsldapi_sasl_do_bind".
saslbind.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__i
mp__sasl_client_start" in Funktion "_nsldapi_sasl_do_bind".
setoption.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__
imp__sasl_setprop" in Funktion "_ldap_set_option@12".
saslio.obj : error LNK2001: Nicht aufgelöstes externes Symbol
"__imp__sasl_setpr
op".
saslio.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp
__sasl_decode" in Funktion "_nsldapi_sasl_read".
saslio.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp
__sasl_encode" in Funktion "_nsldapi_sasl_write".
saslio.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol
"__imp
__sasl_client_new" in Funktion "_nsldapi_sasl_open".
nsldap32v60.dll : fatal error LNK1120: 12 nicht aufgelöste externe Verweise.
make[3]: *** [nsldap32v60.dll] Error 96
make[3]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/libraries/libldap'
make[2]: *** [export] Error 2
make[2]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap/libraries'
make[1]: *** [export] Error 2
make[1]: Leaving directory
`/c/mozilla-build/msys/bin/mozilla/directory/c-sdk/ld
ap'
make: *** [export] Error 2

Please help me what did i wrong ?

It builded some folders and librarys but not all:

new in C:\mozilla-build\msys\bin\mozilla\dist was after that:

bin (inside is nsldif32v60.dll)
lib (inside is nsiutil32v60.lib, nslber32v60.lib, nsldif32v60.dll,
nsldif32v60.lib)

So it started definitly to build the .dll´s but something goes wrong and it
stops.

Regards TheBesciak


0 new messages