Dr. D has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I'm using Strawberry Perl v.5.10.0 under 64-bit Windows Server 2008 R2. I wrote a script which generates some output, and my goal is to generate a pdf file. I tried to install different CPAN libraries, but they all have same issue - they require NMake utility. It used to be available from Microsoft, but no longer is. I did extensive search but couldn't find a single place where I could download it from. Please help. How can I use pdf format in my script. Thank you!

Replies are listed 'Best First'.
Re: pdf libraries for Strawberry Perl
by Marshall (Canon) on Aug 29, 2016 at 18:58 UTC
    Nmake comes with Visual Studio. I found this link on how to find the 64 bit version: where to find nMake 64 bit. If your company doesn't have the professional edition, there may be a 64 bit free version of Visual C++ where you can find it. Microsoft still distributes nMake, the trick is find the right download where you can find it if you can't find a direct download link for that specific file.
Re: pdf libraries for Strawberry Perl
by VinsWorldcom (Prior) on Aug 29, 2016 at 19:12 UTC

    Are sure they required 'nmake' specifically, or just any 'make' utility? Strawberry comes with 'dmake' which essentially does the same thing and is compatible with the GCC distributed with Strawberry. I've had issues in the past trying to use 'nmake' with Strawberry / GCC and 'dmake' with ActivePerl / Visual Studio.

      I found this link on Monks: using dmake instead of nmake on Windows that talks about how to use dmake instead of nmake. Maybe that helps the OP? Also appears to have other tips on how to get nMake in a free SDK.
        Thx. I will take a look
Re: pdf libraries for Strawberry Perl
by dasgar (Priest) on Aug 30, 2016 at 06:02 UTC

    Out of curiosity, what modules are you trying to install and how are you trying to install them?

    As VinsWorldcom pointed out, Strawberry Perl comes MinGW and dmake to allow you to install modules directly from CPAN. Rather than manually downloading the modules, extracting them and trying to build them, I'd recommend using cpan utility to install the modules.

      Different ones, for example PDF::API2. Here are last lines of the output:
      CPAN.pm: Going to build G/GA/GAAS/IO-String-1.08.tar.gz Checking if your kit is complete... Looks good Writing Makefile for IO::String Could not read '\.cpan\build\IO-String-1.08-Wbcw5B\META.yml'. Falling +back to ot her methods to determine prerequisites 'nmake' is not recognized as an internal or external command, operable program or batch file. GAAS/IO-String-1.08.tar.gz nmake -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent stat e Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Running make for B/BH/BHALLISSY/Font-TTF-1.06.tar.gz Has already been unwrapped into directory \.cpan\build\Font-TTF-1.06 +-S4fTAd CPAN.pm: Going to build B/BH/BHALLISSY/Font-TTF-1.06.tar.gz Warning: Prerequisite 'IO::String => 0' for 'B/BH/BHALLISSY/Font-TTF-1 +.06.tar.gz ' failed when processing 'G/GA/GAAS/IO-String-1.08.tar.gz' with 'make +=> NO'. Co ntinuing, but chances to succeed are limited. 'nmake' is not recognized as an internal or external command, operable program or batch file. BHALLISSY/Font-TTF-1.06.tar.gz nmake -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent stat e Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Running make for S/SS/SSIMMS/PDF-API2-2.028.tar.gz Has already been unwrapped into directory \.cpan\build\PDF-API2-2.02 +8-RsRYoe CPAN.pm: Going to build S/SS/SSIMMS/PDF-API2-2.028.tar.gz Warning: Prerequisite 'Font::TTF => 0' for 'S/SS/SSIMMS/PDF-API2-2.028 +.tar.gz' f ailed when processing 'B/BH/BHALLISSY/Font-TTF-1.06.tar.gz' with 'make + => NO'. C ontinuing, but chances to succeed are limited. 'nmake' is not recognized as an internal or external command, operable program or batch file. SSIMMS/PDF-API2-2.028.tar.gz nmake -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent stat e Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: GAAS/IO-String-1.08.tar.gz : make NO SSIMMS/PDF-API2-2.028.tar.gz : make NO BHALLISSY/Font-TTF-1.06.tar.gz : make NO cpan[2]>

        In your original question, you stated that you're using "Strawberry Perl v.5.10.0". Is there any chance that you could move to a newer version of Strawberry Perl?

        I just tried using the portable versions of Strawberry Perl version 5.20.0.1 (32-bit and 64-bit) and 5.24.0.1 (32-bit and 64-bit). I had no issues with installing PDF::API2 (as well as needed prerequisite modules) in any of those environments.

        You've mentioned error messages about nmake. The compiler that comes with Strawberry Perl uses dmake, which is included with Strawberry Perl. During my testing of different portable editions of Strawberry Perl, I did notice the following message:

        Generating a dmake-style Makefile

        My guess is that newer versions of Strawberry Perl are making needed changes to the Makefile to ensure that it will work properly with dmake. Anyways, I suspect that if you can move to a newer version of Strawberry Perl, you'll find it much easier to install modules.