Chris Scharf wrote:
> Wilson Bilkovich wrote:
>> On 4/18/06, Chris Scharf <scharfie / gmail.com> wrote:
>>> on the mswin32 build, please try the pre-built package:
>>> I believe these are the proper locations.  Hopefully this helps someone
>>> out there :-)
>>>
>>> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
>>>
>> 
>> I would LOVE to know how you managed this. I struck out hard on
>> several occasions, and I'd like to learn from my mistakes.
>> 
>> --Wilson.
> 
> Well, the first step was to download the latest Platform SDK 
> (http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en). 
> The reason is that I have MSVC C++ 6.0, and apparently that distribution 
> has a known issue with the wldap32.lib library.  After downloading the 
> SDK, I grabbed the latest ruby-ldap source from sourceforge.
> 
> Now, the ruby-ldap source has a win directory, which has a wldap32.def 
> file, and this is used to build the wldap32.lib file.  However, I think 
> this .def creates the BAD .lib that comes with MSVC 6, so what I did was 
> drop in the one from the platform SDK.
> 
> Now, the tricky part: modifiying the source.  I had to open the 
> sslconn.c file, and change a few things.  The first is that the 
> rb_ldap_sslconn_bind_f function (around line 260) is missing an 
> argument.  The function definition should be:
> 
>   VALUE rb_ldap_sslconn_bind_f(int argc, VALUE argv[], VALUE self,
>     VALUE (*rb_ldap_sslconn_bind_func) (int, VALUE, VALUE))
> 
> The two functions that follow (rb_ldap_sslconn_bind_s and 
> rb_ldap_sslconn_simple_bind_s) make calls to a function called
> 
>   rb_ldap_sslconn_bind_func
> 
> However, it should be
> 
>   rb_ldap_sslconn_bind_f
> 
> 
> Next - the SDK includes special command prompt shortcuts that set up the 
> paths and all that, so I used the one for my machine (Win XP 32-bit), 
> and went to the directory where I had extracted the source.
> 
> Then:
> 
> ruby extconf.rb --with-wldap32
> nmake
> nmake install
> 
> I believe the Platform SDK itself should be sufficient to build 
> everything - the real trick is getting that .lib from the SDK and 
> dropping it in the \win directory of the extracted source, and then 
> changing the source code.



I'm getting the following error when i try to install ruby-ldap-0.9.7 in 
Windows Vista.

extconf.rb:162:in ``': No such file or directory - lib 
/def:./win/wldap32.def /o
ut:./win/wldap32.lib (Errno::ENOENT)
        from extconf.rb:162

Someone can help me?



-- 
Posted via http://www.ruby-forum.com/.