Forum: Ruby Re: ruby-ldap on Windows (built)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Berger, Daniel (Guest)
on 2006-04-18 20:46
(Received via mailing list)
> -----Original Message-----
> From: 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).

<snip>

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
Chris S. (Guest)
on 2006-04-18 23:15
Berger, Daniel wrote:
>> -----Original Message-----
>> From: 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).
>
> <snip>
>
> 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.
This topic is locked and can not be replied to.