comparison src/INSTALLpc.txt @ 12600:590424e87b65 v8.0.1178

patch 8.0.1178: using old compiler on MS-Windows commit https://github.com/vim/vim/commit/73f4439ca690d8224df8f88dc71a43fafdcc89bf Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 7 18:38:43 2017 +0200 patch 8.0.1178: using old compiler on MS-Windows Problem: Using old compiler on MS-Windows. Solution: Switch default build on MS-Windows to use MSVC 2015. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sat, 07 Oct 2017 18:45:04 +0200
parents 4f7081eb1e26
children c6dc5d62cf5e
comparison
equal deleted inserted replaced
12599:e85e7c96d517 12600:590424e87b65
41 41
42 42
43 1. Microsoft Visual C++ 43 1. Microsoft Visual C++
44 ======================= 44 =======================
45 45
46 We do not provide download links, since Microsoft keeps changing them. You
47 can search for "Visual C++ 2015 build tools", for example. You will need to
48 create a Microsoft account (it's free).
49
50
46 Visual Studio 51 Visual Studio
47 ------------- 52 -------------
48 53
49 Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008, 54 Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008,
50 VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions 55 VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
51 should also work for VS 4 and VS 5.) 56 should also work for VS 4 and VS 5.)
52 57
53 Using VS C++ 2008 Express is recommended, the binaries built with that run on 58 Using VS C++ 2008 Express is recommended if you need the binary to run on
54 nearly all platforms. Binaries from later versions may not run on Windows 95 59 Windows 95 or 97, see |msvc-2008-express| below.
55 or XP.
56 60
57 To build Vim from the command line with MSVC, use Make_mvc.mak. 61 To build Vim from the command line with MSVC, use Make_mvc.mak.
58 Visual Studio installed a batch file called vcvars32.bat, which you must 62 Visual Studio installed a batch file called vcvars32.bat, which you must
59 run to set up paths for nmake and MSVC. 63 run to set up paths for nmake and MSVC.
60 64
115 119
116 To set the environment execute the msvc2010.bat script. You can then build 120 To set the environment execute the msvc2010.bat script. You can then build
117 Vim with Make_mvc.mak. 121 Vim with Make_mvc.mak.
118 122
119 123
120 Targeting Windows XP with new MSVC *new-msvc-windows-xp* 124 Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp*
121 ---------------------------------- 125 ---------------------------------------------
122 126
123 Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE 127 Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
124 so that it targets Windows 6.0 (Vista) by default. In order to override 128 so that it targets Windows 6.0 (Vista) by default. In order to override
125 this, the target Windows version number needs to be passed to LINK like 129 this, the target Windows version number needs to be passed to LINK like
126 follows: 130 follows:
127 LINK ... /subsystem:console,5.01 131 LINK ... /subsystem:console,5.01
128 132
129 Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version. 133 Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
130 Use lines like follows to target Windows XP (assuming using Visual C++ 2012 134 Use lines like follows to target Windows XP x86 (assuming using Visual C++
131 under 64-bit Windows): 135 2012 under 64-bit Windows):
132 set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A 136 set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
133 set SDK_INCLUDE_DIR=%WinSdk71%\Include
134 set INCLUDE=%WinSdk71%\Include;%INCLUDE% 137 set INCLUDE=%WinSdk71%\Include;%INCLUDE%
135 set LIB=%WinSdk71%\Lib;%LIB% 138 set LIB=%WinSdk71%\Lib;%LIB%
136 set PATH=%WinSdk71%\Bin;%PATH%
137 set CL=/D_USING_V110_SDK71_ 139 set CL=/D_USING_V110_SDK71_
138 nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01 140 nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
141
142 To target Windows XP x64 instead of x86, you need to change the settings of
143 LIB and SUBSYSTEM_VER:
144 ...
145 set LIB=%WinSdk71%\Lib\x64;%LIB%
146 ...
147 nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.02
148
149 If you use Visual C++ 2015 (either Express or Community Edition), executing
150 msvc2015.bat will set them automatically. For x86 builds run this without
151 options:
152 msvc2015
153 For x64 builds run this with the "x86_amd64" option:
154 msvc2015 x86_amd64
139 155
140 The following Visual C++ team blog can serve as a reference page: 156 The following Visual C++ team blog can serve as a reference page:
141 http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx 157 http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
142 158
143 159
480 496
481 MZSCHEME: Where Racket is installed. 497 MZSCHEME: Where Racket is installed.
482 E.g. C:\Program Files (x86)\Racket 498 E.g. C:\Program Files (x86)\Racket
483 DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes. 499 DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes.
484 MZSCHEME_VER: Racket DLL version which is used for the file name. 500 MZSCHEME_VER: Racket DLL version which is used for the file name.
485 E.g. 3m_9z0ds0 for Racket 6.3. 501 See below for a list of MZSCHEME_VER.
486 The DLL can be found under the lib directory. E.g. 502 The DLL can be found under the lib directory. E.g.
487 C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll 503 C:\Program Files (x86)\Racket\lib\libracket3m_XXXXXX.dll
488 MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at 504 MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at
489 runtime. Default: $(MZSCHEME)\collects 505 runtime. Default: $(MZSCHEME)\collects
490 User can override this with the PLTCOLLECTS environment 506 User can override this with the PLTCOLLECTS environment
491 variable. 507 variable.
508
509 List of MZSCHEME_VER (incomplete):
510
511 Racket ver. | MZSCHEME_VER
512 ==========================
513 6.3 | 3m_9z0ds0
514 6.6 | 3m_a0solc
515 6.8 | 3m_a1zjsw
516 6.10 | 3m_a36fs8
517
492 518
493 E.g. When using MSVC (as one line): 519 E.g. When using MSVC (as one line):
494 520
495 nmake -f Make_mvc.mak 521 nmake -f Make_mvc.mak
496 MZSCHEME="C:\Program Files (x86)\Racket" DYNAMIC_MZSCHEME=yes 522 MZSCHEME="C:\Program Files (x86)\Racket" DYNAMIC_MZSCHEME=yes