Forum: Ruby Re: LDAP from ruby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Berger, Daniel (Guest)
on 2005-12-15 19:21
(Received via mailing list)
> -----Original Message-----
> From: gregarican [mailto:removed_email_address@domain.invalid]
> Sent: Thursday, December 15, 2005 8:38 AM
> To: ruby-talk ML
> Subject: Re: LDAP from ruby

> Personally I ran into problems getting Ruby's LDAP package to
> compile in my Win32 environment. I tried using MSVC, Borland,
> etc. to no avail. So I abandoned trying at the point of
> getting myself tangled up in all of the extconf/mkmf stuff
> that was over my head.
> Perhaps there are others who have succeeded in this area. If
> so I'd love to hear from them :-)

I just tried.  First, pass "--with-wldap32" to extconf.rb.  If you get a
an error regarding dlltool along the lines of "no such file or
directory", go to line 168 and put the word 'lib' in front of dll tool,
so that the command looks like:

`lib dlltool --dllname ...`

However, after trying that, I ended up with these errors:


Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -nologo -MD -Zi -O2b2xg- -G6 -DUSE_WLDAP32 -I./win
-I/usr/local/include -I. -Ic:/ruby/lib
/ruby/1.8/i386-mswin32 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I.
-I./.. -I./../missing -c -Tcconn
win\winldap.h(188) : error C2059: syntax error : '}'
win\winldap.h(199) : error C2059: syntax error : '}'
win\winldap.h(230) : error C2059: syntax error : '}'
win\winldap.h(236) : error C2011: 'timeval' : 'struct' type redefinition
        C:\Program Files\Microsoft Platform SDK for Windows XP
SP2\Include\WinSock.h(97) : see decla
ration of 'timeval'
conn.c(8) : fatal error C1083: Cannot open include file: 'sys/time.h':
No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'

Looking at win\winldap.h I don't understand why those are syntax errors.
The timeval struct definition can be removed altogether I think.  An
#ifdef check needs to be added to conn.c for sys/time.h.

In short, ruby-ldap needs some TLC.  If you can solve those issues, it
should work.


This topic is locked and can not be replied to.