Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

update In the YMMV vein, please see shay's Re: Building Perl with the free MSVC tools. The method below will apparently only work for some modules. I tried with DBI, DBD::SQLite, and Text::CSV_XS and they all work fine, so this method is useful for me regardless of what other modules it will or won't work with.

I got a new winXP box and wanted to be able to use perl (well, duh!) and to compile my own versions of CPAN modules without using cygqin bash or purchasing a compiler from Microsoft (not so duh, but not so hard either).

After attempting unsuccessfully to follow Building Perl with the free MSVC tools and through no fault of the excellent advice of corion++, intrepid++, demerphq++, I gave up and tried to just use the free tools to compile modules with activestate perl ... success!

Here's how:

Caution: these are humongous downloards (hundreds of mb). corion has a script which hopefully he'll share to wget just the needed portions. But here's how I did it with the full (*free* as in beer) downloads:

  1. Download and install Microsoft Visual C++ Toolkit 2003
  2. Download and install Microsoft SDK Platform Update
  3. Download and install .NET redistributable
  4. Download and install .NET SDK
  5. Set environment to recognize the bin/lib/inc dirs for all of those (update these assume the default install paths, but see demerphq's points below for reasons you might want to use short path names instead and for alternate ways to set the environment):
    @echo off
    set MSVC=C:\Program Files\Microsoft Visual C++ Toolkit 2003
    set MSSDK=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7
    set Mstools=C:\Program Files\Microsoft SDK
    
    set INCLUDE=%MSVC%\include;%MSSDK%\include;%Mstools%\include
    set LIB=%MSVC%\lib;%MSSDK%\lib;%Mstools%\Lib;
    set PATH=%MSVC%\bin;%MSSDK%\bin;%Mstools%\Bin;%Mstools%\Bin\WinNT;%PATH%
    
  6. Download and install the latest (*free as in speech*) perl binary

  7. Download and install (*free as in speech*) cygwin (or just grab the needed tools - gzip, tar, cat, etc.)

  8. You can now use PPM or CPAN.pm or CPANPLUS or nmake to compile and install (many) CPAN modules ... Enjoy!
update : made URLs into links per bart's suggestion

In reply to Free MSVC tools + Activestate to compile CPAN Modules by jZed

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (7)
    As of 2014-08-20 05:52 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (105 votes), past polls