3

I want to compile/install a Perl module that depends on a library that is not in Strawberry Perl 5.12. I used Strawberry on a Windows box to install the module (Net-SSH2). The installation failed because it requires the library (libssh2). My issue is similar to this guy's http://www.perlmonks.org/bare/?node_id=814455. But I cannot use that solution because it does not apply to my Perl version and more important, I have very restricted Internet connection.

I downloaded the libssh2 library, but I don't know how specify the include path in the Makefile.PL so I can run:

perl Makefile.PL
make 
make install

I appreciate any help or pointer.

Martin08
  • 20,990
  • 22
  • 84
  • 93

2 Answers2

2

Edit your Makefile.PL and add or edit the INC and/or LIBS parameters in the WriteMakefile call. See the ExtUtils::MakeMaker docs for the expected format. These will be passed to the compiler and linker.

mob
  • 117,087
  • 18
  • 149
  • 283
  • 1
    No file editing necessary, these also work on the command line: `perl Makefile.PL INC=… LIBS=…` – daxim Jul 24 '10 at 06:59
1

Net::SSH2 is included in latest beta of Strawberry Perl. Another option is to unpack this archive into Strawberry's directory.

Alexandr Ciornii
  • 7,346
  • 1
  • 25
  • 29