Skip to content

Commit 02cfac8

Browse files
committed
patch 7.4.1766
Problem: Building instructions for MS-Windows are outdated. Solution: Mention setting SDK_INCLUDE_DIR. (Ben Franklin, closes #771) Move outdated instructions further down.
1 parent 4694a17 commit 02cfac8

2 files changed

Lines changed: 81 additions & 60 deletions

File tree

src/INSTALLpc.txt

Lines changed: 79 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The file "feature.h" can be edited to match your preferences. You can skip
1111
this, then you will get the default behavior as is documented, which should
1212
be fine for most people.
1313

14-
With the exception of two sections (Windows 3.1 and MS-DOS), this document
15-
assumes that you are building Vim for Win32 or later.
16-
(Windows 95/98/Me/NT/2000/XP/2003/Vista/7/8/10)
14+
This document assumes that you are building Vim for Win32 or later (Windows
15+
XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but
16+
they might no longer work.
1717

1818

1919
Contents:
@@ -36,9 +36,7 @@ Contents:
3636

3737

3838
The currently preferred method is using the free Visual C++ Toolkit 2008
39-
|msvc-2008-express|, the produced binary runs on most MS-Windows systems. If
40-
you need the executable to run on Windows 98 or ME, use the 2003 one
41-
|msvc-2003-toolkit|.
39+
|msvc-2008-express|, the produced binary runs on most MS-Windows systems.
4240

4341

4442
1. Microsoft Visual C++
@@ -87,6 +85,69 @@ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
8785
Ron Aaron; they have been tested.
8886

8987

88+
Visual C++ 2008 Express Edition *msvc-2008-express*
89+
-------------------------------
90+
91+
Visual C++ 2008 Express Edition can be downloaded for free from:
92+
http://www.microsoft.com/express/downloads/
93+
This includes the IDE and the debugger.
94+
95+
To set the environment execute the msvc2008.bat script. You can then build
96+
Vim with Make_mvc.mak.
97+
98+
For building 64 bit binaries you also need to install the SDK:
99+
"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
100+
You don't need the examples and documentation.
101+
102+
If you get an error that Win32.mak can't be found, you have to set the
103+
variable SDK_INCLUDE_DIR. For example, on Windows 10, installation of MSVC
104+
puts include files in the following directory:
105+
set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
106+
107+
108+
Visual C++ 2010 Express Edition *msvc-2010-express*
109+
-------------------------------
110+
111+
Visual C++ 2010 Express Edition can be downloaded for free from:
112+
http://www.microsoft.com/express/vc/Default.aspx
113+
This includes the IDE and the debugger.
114+
115+
To set the environment execute the msvc2010.bat script. You can then build
116+
Vim with Make_mvc.mak.
117+
118+
119+
Targeting Windows XP with new MSVC *new-msvc-windows-xp*
120+
----------------------------------
121+
122+
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
123+
so that it targets Windows 6.0 (Vista) by default. In order to override
124+
this, the target Windows version number needs to be passed to LINK like
125+
follows:
126+
LINK ... /subsystem:console,5.01
127+
128+
Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
129+
Use lines like follows to target Windows XP (assuming using Visual C++ 2012
130+
under 64-bit Windows):
131+
set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
132+
set SDK_INCLUDE_DIR=%WinSdk71%\Include
133+
set INCLUDE=%WinSdk71%\Include;%INCLUDE%
134+
set LIB=%WinSdk71%\Lib;%LIB%
135+
set PATH=%WinSdk71%\Bin;%PATH%
136+
set CL=/D_USING_V110_SDK71_
137+
nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
138+
139+
The following Visual C++ team blog can serve as a reference page:
140+
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
141+
142+
143+
OLDER VERSIONS
144+
145+
The minimal supported version is Windows XP. Building with older compilers
146+
might still work, but these instructions might be outdated.
147+
148+
If you need the executable to run on Windows 98 or ME, use the 2003 one
149+
|msvc-2003-toolkit|.
150+
90151
Visual C++ Toolkit 2003 *msvc-2003-toolkit*
91152
-----------------------
92153

@@ -172,55 +233,6 @@ Instructions for integrating the Platform SDK into VC Express:
172233
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
173234

174235

175-
Visual C++ 2008 Express Edition *msvc-2008-express*
176-
-------------------------------
177-
178-
Visual C++ 2008 Express Edition can be downloaded for free from:
179-
http://www.microsoft.com/express/downloads/
180-
This includes the IDE and the debugger.
181-
182-
To set the environment execute the msvc2008.bat script. You can then build
183-
Vim with Make_mvc.mak.
184-
185-
For building 64 bit binaries you also need to install the SDK:
186-
"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1"
187-
You don't need the examples and documentation.
188-
189-
190-
Visual C++ 2010 Express Edition *msvc-2010-express*
191-
-------------------------------
192-
193-
Visual C++ 2010 Express Edition can be downloaded for free from:
194-
http://www.microsoft.com/express/vc/Default.aspx
195-
This includes the IDE and the debugger.
196-
197-
To set the environment execute the msvc2010.bat script. You can then build
198-
Vim with Make_mvc.mak.
199-
200-
201-
Targeting Windows XP with new MSVC *new-msvc-windows-xp*
202-
----------------------------------
203-
204-
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
205-
so that it targets Windows 6.0 (Vista) by default. In order to override
206-
this, the target Windows version number needs to be passed to LINK like
207-
follows:
208-
LINK ... /subsystem:console,5.01
209-
210-
Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
211-
Use lines like follows to target Windows XP (assuming using Visual C++ 2012
212-
under 64-bit Windows):
213-
set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
214-
set SDK_INCLUDE_DIR=%WinSdk71%\Include
215-
set INCLUDE=%WinSdk71%\Include;%INCLUDE%
216-
set LIB=%WinSdk71%\Lib;%LIB%
217-
set PATH=%WinSdk71%\Bin;%PATH%
218-
set CL=/D_USING_V110_SDK71_
219-
nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
220-
221-
The following Visual C++ team blog can serve as a reference page:
222-
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
223-
224236

225237
2. MinGW
226238
========
@@ -253,10 +265,14 @@ System, Advanced, and edit the environment from there. If you use msys2
253265
compilers, set your installed paths:
254266

255267
C:\msys2\mingw32\bin
268+
or
269+
C:\msys64\mingw32\bin
256270

257271
for 32bit. And 64bit:
258272

259273
C:\msys2\mingw64\bin
274+
or
275+
C:\msys64\mingw64\bin
260276

261277
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
262278

@@ -605,7 +621,7 @@ A) Using MSVC
605621
If you want to link with ruby, normally you must use the same compiler as
606622
which was used to build the ruby binary. RubyInstaller is built with MinGW,
607623
so normally you cannot use MSVC for building Vim if you want to link with
608-
RubyInstaller. If you use a different complier, there are mainly two problems:
624+
RubyInstaller. If you use a different compiler, there are mainly two problems:
609625
config.h and Ruby's DLL name. Here are the steps for working around them:
610626

611627
1) Download and Install RubyInstaller.
@@ -639,9 +655,10 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
639655
nmake -f Make_mvc.mak
640656
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
641657
RUBY_MSVCRT_NAME=msvcrt
642-
WINVER=0x500
658+
WINVER=0x501
643659

644-
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
660+
If you set WINVER explicitly, it must be set to >=0x500, when building
661+
with Ruby 2.1 or later. (Default is 0x501.)
645662
When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt
646663
which is used for the Ruby's DLL name.
647664

@@ -652,9 +669,11 @@ After you install RubyInstaller, just type this (as one line):
652669

653670
mingw32-make -f Make_ming.mak
654671
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
655-
WINVER=0x500
672+
WINVER=0x501
673+
674+
If you set WINVER explicitly, it must be set to >=0x500, when building with
675+
Ruby 2.1 or later. (Default is 0x501.)
656676

657-
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
658677

659678

660679
12. Building with Tcl support

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1766,
751753
/**/
752754
1765,
753755
/**/

0 commit comments

Comments
 (0)