This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SQL::Translator triggered a subtle piece of wrongness, whereby it
[perl5.git] / README.win32
index 47cc685..710266f 100644 (file)
@@ -42,16 +42,20 @@ system).  Currently, this port is capable of using one of the
 following compilers on the Intel x86 architecture:
 
       Borland C++           version 5.02 or later
-      Microsoft Visual C++  version 4.2 or later
+      Microsoft Visual C++  version 2.0 or later
       MinGW with gcc        gcc version 2.95.2 or later
 
 The last of these is a high quality freeware compiler.  Use version
 3.2.x or later for the best results with this compiler.
 
-The Microsoft Visual C++ compiler is also now being given away free in
-the "Visual C++ Toolkit 2003", and also as part of the ".NET Framework
-SDK".  This is the same compiler that ships with "Visual Studio .NET 2003
-Professional".
+The Borland C++ and Microsoft Visual C++ compilers are also now being given
+away free.  The Borland compiler is available as "Borland C++ Compiler Free
+Command Line Tools" and is the same compiler that ships with the full
+"Borland C++ Builder" product.  The Microsoft compiler is available as
+"Visual C++ Toolkit 2003" or "Visual C++ 2005/2008 Express Edition" (and also
+as part of the ".NET Framework SDK") and is the same compiler that ships with
+"Visual C++ .NET 2003 Professional" or "Visual C++ 2005/2008 Professional"
+respectively.
 
 This port can also be built on the Intel IA64 using:
 
@@ -79,15 +83,9 @@ and parallelability.
 
 A port of dmake for Windows is available from:
 
-    http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip
+    http://search.cpan.org/dist/dmake/
 
-(This is a fixed version of the original dmake sources obtained from
-http://www.wticorp.com/  As of version 4.1PL1, the original
-sources did not build as shipped and had various other problems.
-A patch is included in the above fixed version.)
-
-Fetch and install dmake somewhere on your path (follow the instructions
-in the README.NOW file).
+Fetch and install dmake somewhere on your path.
 
 There exists a minor coexistence problem with dmake and Borland C++
 compilers.  Namely, if a distribution has C files named with mixed
@@ -137,10 +135,87 @@ and edit win32/config.vc to change "make=nmake" into "make=dmake".  The
 latter step is only essential if you want to use dmake as your default
 make for building extensions using MakeMaker.
 
+=item Microsoft Visual C++ 2008 Express Edition Beta 2
+
+This free version of Visual C++ 2008 Professional contains the same compiler
+and linker that ship with the full version, and also contains everything
+necessary to build Perl, rather than requiring a separate download of the
+Platform SDK like previous versions did.
+
+The Beta 2 package is currently available from 
+
+http://msdn2.microsoft.com/en-us/express/future/default.aspx
+http://msdn2.microsoft.com/en-gb/express/future/default.aspx
+
+The final release version will probably be found by searching in the Download
+Center at http://www.microsoft.com/downloads/search.aspx?displaylang=en in due
+course.
+
+Install Visual C++ 2008, then setup your environment using
+
+       C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat
+
+(assuming the default installation location was chosen).
+
+Perl should now build using the win32/Makefile.  You will need to edit that
+file to set
+
+       CCTYPE = MSVC90FREE
+
+first.
+
+=item Microsoft Visual C++ 2005 Express Edition
+
+This free version of Visual C++ 2005 Professional contains the same compiler
+and linker that ship with the full version, but doesn't contain everything
+necessary to build Perl.
+
+You will also need to download the "Platform SDK" (the "Core SDK" and "MDAC
+SDK" components are required) for more header files and libraries.
+
+These packages can both be downloaded by searching in the Download Center at
+http://www.microsoft.com/downloads/search.aspx?displaylang=en.  (Providing exact
+links to these packages has proven a pointless task because the links keep on
+changing so often.)
+
+Try to obtain the latest version of the Platform SDK.  Sometimes these packages
+contain a particular Windows OS version in their name, but actually work on
+other OS versions too.  For example, the "Windows Server 2003 R2 Platform SDK"
+also runs on Windows XP SP2 and Windows 2000.
+
+According to the download pages these packages are only supported on Windows
+2000/XP/2003, so trying to use these tools on Windows 95/98/ME and even Windows
+NT probably won't work.
+
+Install Visual C++ 2005 first, then the Platform SDK.  Setup your environment
+as follows (assuming default installation locations were chosen):
+
+       SET PlatformSDKDir=C:\Program Files\Microsoft Platform SDK
+
+       SET PATH=%SystemRoot%\system32;%SystemRoot%;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;%PlatformSDKDir%\Bin
+
+       SET INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;%PlatformSDKDir%\include
+
+       SET LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%PlatformSDKDir%\lib
+
+       SET LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
+
+(The PlatformSDKDir might need to be set differently depending on which version
+you are using. Earlier versions installed into "C:\Program Files\Microsoft SDK",
+while the latest versions install into version-specific locations such as
+"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2".)
+
+Perl should now build using the win32/Makefile.  You will need to edit that
+file to set
+
+       CCTYPE = MSVC80FREE
+
+and to set CCHOME, CCINCDIR and CCLIBDIR as per the environment setup above.
+
 =item Microsoft Visual C++ Toolkit 2003
 
 This free toolkit contains the same compiler and linker that ship with
-Visual Studio .NET 2003 Professional, but doesn't contain everything
+Visual C++ .NET 2003 Professional, but doesn't contain everything
 necessary to build Perl.
 
 You will also need to download the "Platform SDK" (the "Core SDK" and "MDAC
@@ -151,30 +226,35 @@ Framework Redistributable" to be installed first.  This can be downloaded and
 installed separately, but is included in the "Visual C++ Toolkit 2003" anyway.
 
 These packages can all be downloaded by searching in the Download Center at
-http://www.microsoft.com/downloads/search.aspx?displaylang=en
-
-The Platform SDK packages can also be obtained from the Platform SDK Update
-site: http://www.microsoft.com/msdownload/platformsdk/sdkupdate  Note that this
-site requires Internet Explorer 5.0 or later to function, but the site's home
-page currently gives links to two download pages for users of other browsers:
-
-For Windows XP Service Pack 2:
-http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm
+http://www.microsoft.com/downloads/search.aspx?displaylang=en.  (Providing exact
+links to these packages has proven a pointless task because the links keep on
+changing so often.)
 
-For Windows Server 2003:
-http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
+Try to obtain the latest version of the Platform SDK.  Sometimes these packages
+contain a particular Windows OS version in their name, but actually work on
+other OS versions too.  For example, the "Windows Server 2003 R2 Platform SDK"
+also runs on Windows XP SP2 and Windows 2000.
 
-According to the download pages the Toolkit and the .NET Framework SDK are only
-supported on Windows 2000/XP/2003, so trying to use these tools on Windows
-95/98/ME and even Windows NT probably won't work.
+According to the download pages these packages are only supported on Windows
+2000/XP/2003, so trying to use these tools on Windows 95/98/ME and even Windows
+NT probably won't work.
 
 Install the Toolkit first, then the Platform SDK, then the .NET Framework SDK.
 Setup your environment as follows (assuming default installation locations
 were chosen):
 
-       SET PATH=%SystemRoot%\system32;%SystemRoot%;C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;C:\Program Files\Microsoft SDK\Bin;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin
-       SET INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft SDK\include;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
-       SET LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft SDK\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
+       SET PlatformSDKDir=C:\Program Files\Microsoft Platform SDK
+
+       SET PATH=%SystemRoot%\system32;%SystemRoot%;C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PlatformSDKDir%\Bin;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin
+
+       SET INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%PlatformSDKDir%\include;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
+
+       SET LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%PlatformSDKDir%\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib
+
+(The PlatformSDKDir might need to be set differently depending on which version
+you are using. Earlier versions installed into "C:\Program Files\Microsoft SDK",
+while the latest versions install into version-specific locations such as
+"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2".)
 
 Several required files will still be missing:
 
@@ -188,7 +268,7 @@ following:
 
        C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
 
-Copy it from there to C:\Program Files\Microsoft SDK\Bin
+Copy it from there to %PlatformSDKDir%\Bin
 
 =item *
 
@@ -217,12 +297,12 @@ $Config{ar}.
 
 setargv.obj is required to build perlglob.exe (and perl.exe if the USE_SETARGV
 option is enabled).  The Platform SDK supplies this object file in source form
-in C:\Program Files\Microsoft SDK\src\crt.  Copy setargv.c, cruntime.h and
+in %PlatformSDKDir%\src\crt.  Copy setargv.c, cruntime.h and
 internal.h from there to some temporary location and build setargv.obj using
 
        cl.exe /c /I. /D_CRTBLD setargv.c
 
-Then copy setargv.obj to C:\Program Files\Microsoft SDK\lib
+Then copy setargv.obj to %PlatformSDKDir%\lib
 
 Alternatively, if you don't need perlglob.exe and don't need to enable the
 USE_SETARGV option then you can safely just remove all mention of $(GLOBEXE)
@@ -231,11 +311,11 @@ from win32/Makefile and setargv.obj won't be required anyway.
 =back
 
 Perl should now build using the win32/Makefile.  You will need to edit that
-file to comment-out CCTYPE = MSVC60 (since that enables delay-loading of the
-Winsock DLL which the free toolkit does not support) and to set CCHOME,
-CCINCDIR and CCLIBDIR as per the environment setup above.  You may also want to
-change both mentions of the compiler's "-Gf" switch to "-GF" since the former
-is deprecated in VC7 and will be removed from future versions.
+file to set
+
+       CCTYPE = MSVC70FREE
+
+and to set CCHOME, CCINCDIR and CCLIBDIR as per the environment setup above.
 
 =item Microsoft Platform SDK 64-bit Compiler
 
@@ -245,7 +325,7 @@ shells available after you install the Platform SDK from the Start Menu.
 
 =item MinGW release 3 with gcc
 
-The latest release of MinGW at the time of writing is 3.1.0, which contains 
+The latest release of MinGW at the time of writing is 3.1.0, which contains
 gcc-3.2.3.  It can be downloaded here:
 
     http://www.mingw.org/
@@ -307,7 +387,7 @@ defaults in the dmake makefile are setup to build using MinGW/gcc.
 
 =item *
 
-Edit the makefile.mk (or Makefile, if you're using nmake) and change 
+Edit the makefile.mk (or Makefile, if you're using nmake) and change
 the values of INST_DRV and INST_TOP.   You can also enable various
 build flags.  These are explained in the makefiles.
 
@@ -318,13 +398,20 @@ lib/ExtUtils/t/Embed.t test, which attempts to build a test program and
 may end up building against the installed perl's lib/CORE directory rather
 than the one being tested.
 
-You will have to make sure that CCTYPE is set correctly and that 
+You will have to make sure that CCTYPE is set correctly and that
 CCHOME points to wherever you installed your compiler.
 
 The default value for CCHOME in the makefiles for Visual C++
 may not be correct for some versions.  Make sure the default exists
 and is valid.
 
+You may also need to comment out the C<DELAYLOAD = ...> line in the
+Makefile if you're using VC++ 6.0 without the latest service pack and
+the linker reports an internal error.
+
+If you are using VC++ 4.2 or earlier then you'll have to change the /EHsc
+option in the CXX_FLAG macro to the equivalent /GX option.
+
 If you have either the source or a library that contains des_fcrypt(),
 enable the appropriate option in the makefile.  A ready-to-use version
 of fcrypt.c, based on the version originally written by Eric Young at
@@ -335,6 +422,9 @@ you can set CRYPT_LIB to point to the library name.
 Perl will also build without des_fcrypt(), but the crypt() builtin will
 fail at run time.
 
+If you want build some core extensions statically into perl's dll, specify
+them in the STATIC_EXT macro.
+
 Be sure to read the instructions near the top of the makefiles carefully.
 
 =item *
@@ -617,10 +707,10 @@ be a source of frustration if you use such a perl binary with an
 alternate shell that *does* expand wildcards.
 
 Instead, the following solution works rather well. The nice things
-about it are 1) you can start using it right away; 2) it is more 
+about it are 1) you can start using it right away; 2) it is more
 powerful, because it will do the right thing with a pattern like
 */*/*.c; 3) you can decide whether you do/don't want to use it; and
-4) you can extend the method to add any customizations (or even 
+4) you can extend the method to add any customizations (or even
 entirely different kinds of wildcard expansion).
 
        C:\> copy con c:\perl\lib\Wild.pm
@@ -670,13 +760,12 @@ To ensure smooth transitioning of existing code that uses the
 ActiveState port, there is a bundle of Win32 extensions that contains
 all of the ActiveState extensions and several other Win32 extensions from
 CPAN in source form, along with many added bugfixes, and with MakeMaker
-support.  This bundle is available at:
+support.  The latest version of this bundle is available at:
 
-   http://www.cpan.org/modules/by-module/Win32/libwin32-0.191.zip
+    http://search.cpan.org/dist/libwin32/
 
 See the README in that distribution for building and installation
-instructions.  Look for later versions that may be available at the
-same location.
+instructions.
 
 =item Notes on 64-bit Windows
 
@@ -818,15 +907,15 @@ find a mailer on your system).
 
 =head1 BUGS AND CAVEATS
 
-Norton AntiVirus interferes with the build process, particularly if 
-set to "AutoProtect, All Files, when Opened". Unlike large applications 
-the perl build process opens and modifies a lot of files. Having the  
+Norton AntiVirus interferes with the build process, particularly if
+set to "AutoProtect, All Files, when Opened". Unlike large applications
+the perl build process opens and modifies a lot of files. Having the
 the AntiVirus scan each and every one slows build the process significantly.
 Worse, with PERLIO=stdio the build process fails with peculiar messages
-as the virus checker interacts badly with miniperl.exe writing configure 
+as the virus checker interacts badly with miniperl.exe writing configure
 files (it seems to either catch file part written and treat it as suspicious,
 or virus checker may have it "locked" in a way which inhibits miniperl
-updating it). The build does complete with 
+updating it). The build does complete with
 
    set PERLIO=perlio
 
@@ -859,7 +948,7 @@ Thus, signals may work only for simple things like setting a flag
 variable in the handler.  Using signals under this port should
 currently be considered unsupported.
 
-Please send detailed descriptions of any problems and solutions that 
+Please send detailed descriptions of any problems and solutions that
 you may find to E<lt>F<perlbug@perl.org>E<gt>, along with the output
 produced by C<perl -V>.
 
@@ -878,9 +967,13 @@ of O'Reilly and Associates, Inc. Used with permission.
 
 =item Nick Ing-Simmons E<lt>nick@ing-simmons.netE<gt>
 
+=item Jan Dubois E<lt>jand@activestate.comE<gt>
+
+=item Steve Hay E<lt>steve.hay@uk.radan.comE<gt>
+
 =back
 
-This document is maintained by Gurusamy Sarathy.
+This document is maintained by Jan Dubois.
 
 =head1 SEE ALSO
 
@@ -905,6 +998,6 @@ Win9x support was added in 5.6 (Benjamin Stuhl).
 
 Support for 64-bit Windows added in 5.8 (ActiveState Corp).
 
-Last updated: 30 July 2004
+Last updated: 29 August 2007
 
 =cut