Trying to build static libsasl.lib for Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm currently maintaining the binary builds (eggs) of python-ldap
(http://python-ldap.sf.net). So far I built the Windows versions using
MingW, and therefore have to deliver an extra package of DLLs (sasl,
OpenLDAP, openssl, ...).

To circumvent this, I now try to build everything statically using
Visual Studio .NET. For some parts, e.g. openssl, this works like a
charm, but trying to build static cyrus-sasl-libs I ran into problems.

To build the library, I introduced a new target in lib/NTMakefile:

libsasl.lib: $(libsasl_objs) $(libsasl_res)
  lib /out:"libsasl.lib" /subsystem:console \
	$(SYS_LIBS) $(EXTRA_LIBS) $(libsasl_objs) $(libsasl_res)

Doing so (and leaving out the .dll part, that would indirectly build
libsasl.lib as an import library, everything seems fine. But as soon as
I try to link against libsasl.lib, I get:

saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_errstring
 referenced in function _exit_sasl
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_done
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_dispose
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__prop_dispose
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_auxprop_store
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__prop_set
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__prop_request
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__prop_new
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_setpass
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_server_new
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_server_init
 referenced in function _main
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__sasl_version
 referenced in function _main
saslpasswd.obj : error LNK2001: unresolved external symbol __imp__optind
saslpasswd.obj : error LNK2001: unresolved external symbol __imp__optarg
saslpasswd.obj : error LNK2019: unresolved external symbol __imp__getopt
 referenced in function _main
saslpasswd2.exe : fatal error LNK1120: 15 unresolved externals

Does anyone know, how to do it right?

Thanks in advance and best regards,
Torsten
-- 
  Some bachelors want a meaningful overnight relationship.

[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux