Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found