From: Curt Hibbs Date: 2004-12-03T04:09:39+09:00 Subject: Re: OpenSSL and 1-click installer (Re: [ANN] Net::SSH 0.6.0) Thanks Jamis... Having the steps you went through should be a *big* help. Curt Jamis Buck wrote: > > Curt Hibbs wrote: > > > > I'm planning to incloude OpenSSL in the next time I post a > release of the > > One-Click Installer. I haven't yet tried to build/integrate > OpenSLL, so I > > don't know if I'll run into any problems. But when I asked about this on > > ruby-talk, the responses seem to indicate I should not have any > problems. > > Well, here's the process I went through to get this to work. > (Disclaimers: I am NOT a windows developer, nor a windows user, so I may > have made things much harder for me than they needed to be. Also, I do > not have access to MSVC++, so I used the free commandline tools and the > Windows XP SP2 SDK, freely available from MS.) > > 1) Install the OpenSSL binary for Windows > (http://www.slproweb.com/products/Win32OpenSSL.html) Per the > instructions given at that site, I then copied the contents of the > 'install' and 'lib/vc' subdirectories to the corresponding system > directories (so that the headers and libs are accessible without having > to set any INCLUDE or LIB environment variables). > > 2) Copy the 'ext/openssl' subdirectory from Ruby CVS. > > 3) I had to tweak mkmf.rb (apparently the version I had was older). I > added "header=nil" as the third parameter to the "have_library" method, > and passed 'header' as the third argument to #try_func in the same method. > > 4) I tweaked the ext/openssl/extconf.rb so that the calls to > have_library passed "openssl/ssl.h" as the 'header' parameter. > (Otherwise, the extconf.rb pass kept failing saying that the > OpenSSL_add_all_digests function was not defined. Maybe there is a > better way to do this--but I couldn't see any options to cl that said to > allow calls to functions without explicit prototypes...) > > 5) Running extconf.rb worked, at this point, and I got a makefile. > > 6) Running nmake then built the library. > > Quite possibly the problems I encountered had more to do with my > ignorance of windows development than anything else, so it may be a much > simpler process to build Ruby/OpenSSL under Windows for someone who > knows what they are doing. > > - Jamis