Tag: openldap

使用C访问Active Directory

在http://www-archive.mozilla.org/directory/csdk-docs/example.htm的代码中进行了一些修改之后,我尝试了以下代码。 # include # include “ldap.h” int main( int argc, char **argv ) { LDAP *ld; int rc; /* Get a handle to an LDAP connection. */ if ( (ld = ldap_init( “ipaddr”, port )) == NULL ) { perror( “ldap_init” ); return( 1 ); } /* Bind anonymously to the LDAP server. */ rc […]

如何使用Msys2和MinGW在Windows上构建OpenLDAP库?

我正在尝试在Windows上构建OpenLDAP。 我这样做非常困难。 我开始按照这里列出的指示,但很快意识到它已经过时了。 然后我发现了这一点 ,并意识到它也不是很正确。 我终于找到了这个 ,并且经历了这个家伙正在经历的确切错误。 然而,当我尝试他的工作时(在portable.h中评论第1116行)我遇到了更多的问题。 是否有用于构建此库的规范来源? 我正在使用: Windows 7专业版。 Msys2(x86_64 20160205来自这里 ) OpenSSL(版本1.0.1r从这里 ) rxspencer(alpha 3.8.g7 from here ) OpenLDAP(版本2.4.44从这里开始 ) 第0步: 编译rxspencer ./configure make make check make install 步骤1: 使用Visual Studio 2010 x64命令提示符编译OpenSSL perl Configure no-ssl2 VC-WIN64A –prefix=d:\temp\openssl\x64 ./ms/do_win64a.bat nmake -f ms\nt.mak nmake -f ms\ntdll.mak cd out32 ..\ms\test 第2步: 修改路径,以便configure能够看到rxspencer PATH=$PATH:/usr/local/lib […]