Building Perl for Win32
Bill Hess - bhess@techrg.com
Software Versions used in this Example
- Perl Version = 5.003_03
- OS Version = Windows NT Workstation 4.0
- Compiler = Visual C++ 5.0 or 6.0
- Shell = cmd.exe
Space Requirements
- Source Code for Building ~ 26.4 MB
- Installed after Build ~ 11.2 MB
- Total Space Required for Build and Install ~ 40 MB
Download the latest stable source of Perl from CPAN - www.perl.com
- stable.tar.gz - GNU ZIP
- stable.zip - PK ZIP
Put the source into a temporary directory, for example:
Reference the README.win32 file for detailed information on compiling
The VCVARS32.BAT will need to be run to set up your build environment
- This can be found under the Visual C++ install location
Change to the win32 directory under the Perl source, for example:
- C:\temp\perl5.003_03\win32
Edit 'C:\temp\perl5.003_03\win32\Makefile' and set the install drive and directory by editing the following two lines:
- INST_DRV *= c:
- INST_TOP *= $(INST_DRV)\perl
Compile the Perl source using the supplied makefile.
- Type 'nmake' while in the 'C:\temp\perl5.003_03\win32' directory
Test the build by typing 'nmake test' while in the 'C:\temp\perl5.003_03\win32' directory
- Watch the tests run by and all should get an 'ok' except skipped
tests
- When finished you should get an 'All tests successful' message
Install Perl by typing 'nmake install' while in the 'C:\temp\perl5.003_03\win32' directory
- This will copy all of the necessary files to the install directory
determined above by the INST_DRV and INST_TOP variables in the
Makefile
- This will also generate all of the online Perl documentation
Add the following Perl directories to the PATH environment variable:
- C:\perl\5.00503\bin
- C:\perl\5.00503\bin\MSWin32-x86
Bring up a new shell and you are ready to go...