# Re: ruby-ldap on Windows (built)

**URL:** <https://www.ruby-forum.com/t/re-ruby-ldap-on-windows-built/58125>\
**Category:** Ruby\
**Created:** [April 18, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/re-ruby-ldap-on-windows-built/58125 "2006-04-18T18:46:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [April 18, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/re-ruby-ldap-on-windows-built/58125/1 "2006-04-18T18:46:55Z")

</div>

> -----Original Message-----  
> From: removed\_email\_address@domain.invalid  
> [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Chris S.  
> Sent: Tuesday, April 18, 2006 10:28 AM  
> To: ruby-talk ML  
> Subject: ruby-ldap on Windows (built)
> 
> I have finally managed to build the ruby-ldap library for the Windows  
> platform (i.e. not a cygwin or ming build, but an mswin32 build).

Excellent work.

May I ask how you did it? I did build errors from sslconn.c that I  
don’t see how you could have gotten around without modifying the source.

Thanks,

Dan

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [April 18, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-ruby-ldap-on-windows-built/58125/2 "2006-04-18T21:15:43Z")

</div>

Berger, Daniel wrote:

> > -----Original Message-----  
> > From: removed\_email\_address@domain.invalid  
> > [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Chris S.  
> > Sent: Tuesday, April 18, 2006 10:28 AM  
> > To: ruby-talk ML  
> > Subject: ruby-ldap on Windows (built)
> > 
> > I have finally managed to build the ruby-ldap library for the Windows  
> > platform (i.e. not a cygwin or ming build, but an mswin32 build).
> 
> Excellent work.
> 
> May I ask how you did it? I did build errors from sslconn.c that I  
> don’t see how you could have gotten around without modifying the source.
> 
> Thanks,
> 
> Dan

I did have to modify the sslconn.c source slightly, in fact. There are  
three references to rb\_ldap\_sslconn\_bind\_func which should in fact be  
rb\_ldap\_sslconn\_bind\_f, and the rb\_ldap\_sslconn\_bind\_f is missing an  
argument (the third argument should be VALUE self).

After that, it was a matter of download Microsoft bloat (700MB Platform  
SDK), and building the make file.

The biggest problem is that the win directory creates the wldap32.lib  
file - however, I discovered that this .lib is a known bad library, and  
so I dropped in the one from the SDK. Without the proper version, even  
when I got it to compile, it would crash during a bind. Dropping in the  
.lib from the SDK alleviated this issue as well as all the build  
warnings about mismatched linker offsets.
