in reply to Re: Problem installing Crypt::OpenSSL::Random on Win32
in thread Problem installing Crypt::OpenSSL::Random on Win32

Strawberry Perl ships with both ssl and crypto libraries, named libssl32.a and libcrypt32.a. I tried copying the libraries to, respectively, libssl.a and libcrypto.a. The warnings about missing libraries went away, but the complaints about the unresolved references didn't. The RAND_* functions appear in openssl/rand.h, which ships with Strawberry, so the functions should be in there somewhere, right? I'm wondering if this is a configuration problem either with Strawberry Perl (v. 5.8.9.3) or (much less likely, I assume) with the CPAN module.
  • Comment on Re^2: Problem installing Crypt::OpenSSL::Random on Win32

Replies are listed 'Best First'.
Re^3: Problem installing Crypt::OpenSSL::Random on Win32
by Anonymous Monk on Dec 31, 2009 at 18:37 UTC
    If you downloaded a win32 zip version of openssl (as opposed to installing mingw based version into C:\strawberry\c), you can use
    perl Makefile.PL "LIBS=-LC:\openssl\lib\MinGW -llibeay32 -lssleay32" " +INC=-IC:\openssl\include"
      I managed to find the right library in the mingw distribution. Copying libeay32.a to libssl.a did the trick. (I suppose downloading another openssl win32 library would also work, but this was easier. :-)
        Copying libeay32.a to libssl.a did the trick

        I certainly didn't expect Strawberry to go with *that* naming convention for their openssl libraries. I expected they would stick with the more general '-lssl -lcrypto' nomenclature (which is what mingw builds for native win32 in the msys shell) .... but I was wrong. I guess they have good reason(s) for doing that.

        Cheers,
        Rob
        All you had to do was pass Makefile.PL some arguments

        Thanks for that easy fix.

        Strawberry perl 5.12.3 on Windows 7 has the same problem, and the same fix: copy libeay32.a to libssl.a and the install succeeds.