Subject: | "-lcrypto -lssl" doesn't always find the OpenSSL libs |
Hi,
On MS Windows, instead of "-lcrypto -lssl" we might need to link to "-leay32 -lssl32". (For example, this is the case with Strawberry Perl - though, for my Windows perls, "-lcrypto -lssl" is needed.)
This patch to the Makefile.PL should portably fix the issue:
#############################
--- Makefile.PL_orig 2015-11-20 10:12:44 +1100
+++ Makefile.PL 2015-11-20 10:18:33 +1100
@@ -13,7 +13,7 @@
LICENSE => 'gplv2+ or artistic'
) : ()
),
- LIBS => ['-lcrypto -lssl '], # e.g., '-lm'
+ LIBS => ['-lcrypto -lssl -leay32 -lssl32'], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I.', # e.g., '-I. -I/usr/include/other'
);
#############################
It makes use of the ExtUtils::MakeMaker feature that removes links to libraries that are not locatable.
Cheers,
Rob