develooper Front page | perl.perl5.porters | Postings from December 2004

Patch to README.win32 distributed with 5.8.6 for building under .net/ MSVC7 (free)

Thread Next
From:
Max Maischein
Date:
December 5, 2004 17:27
Subject:
Patch to README.win32 distributed with 5.8.6 for building under .net/ MSVC7 (free)
Message ID:
41B355EC.9010505@corion.net
Hello,

below is a patch to the README.win32 that changes some of the 
description on how to build with the free MSVC compiler distributed with 
.net. The three major points are:

1) Using a batch file instead of $Config{ar} = 'link /lib' is a bad 
idea, as the batch file will croak if there are too many arguments on 
the command line.

2) I did not find C<setargv.obj> (or any of its source files) installed 
in my collection of SDKs and I still built Perl by removing all 
references to GLOBEXE from the Makefile.vc.

3) MSVC7 doesn't like "-Gf", so I use "-GF" instead.

I don't know if any of the three steps (especially the 'ar' replacement) 
has other ugly side effects, but if not, I think the steps are good to 
mention in the C<README.win32>.

It is also possible to circumvent the ugly prerequisite of IE5 by 
directly downloading and unpacking the SDK files from Microsoft, but I 
haven't gotten around fixing up a .cmd file that automates this process.

I'm not subscribed to p5p, so please CC me on any comments you have.

Have fun,
-max

C:\perl\perl-5.8.6-build\perl-5.8.6>diff -u README.win32 README.win32.new
--- README.win32        Sat Nov 27 20:02:22 2004
+++ README.win32.new    Sun Dec 05 19:34:53 2004
@@ -188,25 +188,24 @@
  =item *

  lib.exe is normally used to build libraries, but link.exe with the /lib
-option also works, so create a batch file called lib.bat in
-C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin containing:
+option also works, so change Config.vc to use it instead:

-       @echo off
-       link /lib %*
-
-This will work as long as "lib.exe" is invoked simply as "lib" (which it is
-during the Perl build process).
+Change the line reading
+       ar='lib'
+to
+       ar='link /lib'

  =item *

  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
-internal.h from there to some temporary location and build setargv.obj 
using
+option is enabled). If you don't need perlglob.exe and don't need the
+USE_SETARGV option, you can safely remove all mentions of $(GLOBEXE) from
+the file win32/Makefile.

-       cl.exe /c /I. /D_CRTBLD setargv.c
+=item *

-Then copy setargv.obj to C:\Program Files\Microsoft SDK\lib
+The compiler options include the "-Gf" switch which has been superceded
+by the "-GF" switch. Replace the two instances of it with "-GF".

  =back

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About