Patch 8.0.1178
Problem: Using old compiler on MS-Windows.
Solution: Switch default build on MS-Windows to use MSVC 2015. (Ken Takata)
Files: src/msvc2015.bat, src/INSTALLpc.txt, src/GvimExt/Makefile,
src/Make_mvc.mak, src/tee/Make_mvc.mak, src/xxd/Make_mvc.mak
*** ../vim-8.0.1177/src/msvc2015.bat 2017-10-07 18:38:09.280194441 +0200
--- src/msvc2015.bat 2017-10-07 17:58:14.697770841 +0200
***************
*** 0 ****
--- 1,33 ----
+ @echo off
+ rem To be used on MS-Windows for Visual C++ 2015 (either Express or Community)
+ rem See INSTALLpc.txt for information.
+ rem
+ rem Usage:
+ rem For x86 builds run this without options:
+ rem msvc2015
+ rem For x64 builds run this with "x86_amd64" option:
+ rem msvc2015 x86_amd64
+ @echo on
+
+ call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %*
+
+ rem Use Windows SDK 7.1A for targeting Windows XP.
+ if "%ProgramFiles(x86)%"=="" (
+ set "WinSdk71=%ProgramFiles%\Microsoft SDKs\Windows\v7.1A"
+ ) else (
+ set "WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A"
+ )
+ if not exist "%WinSdk71%" (
+ echo Windows SDK 7.1A is not found. Targeting Windows Vista and later.
+ goto :eof
+ )
+
+ set INCLUDE=%WinSdk71%\Include;%INCLUDE%
+ if "%Platform%"=="x64" (
+ set "LIB=%WinSdk71%\Lib\x64;%LIB%"
+ set SUBSYSTEM_VER=5.02
+ ) else (
+ set "LIB=%WinSdk71%\Lib;%LIB%"
+ set SUBSYSTEM_VER=5.01
+ )
+ set CL=/D_USING_V110_SDK71_
*** ../vim-8.0.1177/src/INSTALLpc.txt 2017-08-23 22:40:37.165363011 +0200
--- src/INSTALLpc.txt 2017-10-07 18:27:06.091930366 +0200
***************
*** 43,48 ****
--- 43,53 ----
1. Microsoft Visual C++
=======================
+ We do not provide download links, since Microsoft keeps changing them. You
+ can search for "Visual C++ 2015 build tools", for example. You will need to
+ create a Microsoft account (it's free).
+
+
Visual Studio
-------------
***************
*** 50,58 ****
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
should also work for VS 4 and VS 5.)
! Using VS C++ 2008 Express is recommended, the binaries built with that run on
! nearly all platforms. Binaries from later versions may not run on Windows 95
! or XP.
To build Vim from the command line with MSVC, use Make_mvc.mak.
Visual Studio installed a batch file called vcvars32.bat, which you must
--- 55,62 ----
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
should also work for VS 4 and VS 5.)
! Using VS C++ 2008 Express is recommended if you need the binary to run on
! Windows 95 or 97, see |msvc-2008-express| below.
To build Vim from the command line with MSVC, use Make_mvc.mak.
Visual Studio installed a batch file called vcvars32.bat, which you must
***************
*** 117,124 ****
Vim with Make_mvc.mak.
! Targeting Windows XP with new MSVC *new-msvc-windows-xp*
! ----------------------------------
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
so that it targets Windows 6.0 (Vista) by default. In order to override
--- 121,128 ----
Vim with Make_mvc.mak.
! Targeting Windows XP with MSVC 2012 and later *new-msvc-windows-xp*
! ---------------------------------------------
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
so that it targets Windows 6.0 (Vista) by default. In order to override
***************
*** 127,142 ****
LINK ... /subsystem:console,5.01
Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
! Use lines like follows to target Windows XP (assuming using Visual C++ 2012
! under 64-bit Windows):
set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
- set SDK_INCLUDE_DIR=%WinSdk71%\Include
set INCLUDE=%WinSdk71%\Include;%INCLUDE%
set LIB=%WinSdk71%\Lib;%LIB%
- set PATH=%WinSdk71%\Bin;%PATH%
set CL=/D_USING_V110_SDK71_
nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
The following Visual C++ team blog can serve as a reference page:
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
--- 131,158 ----
LINK ... /subsystem:console,5.01
Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version.
! Use lines like follows to target Windows XP x86 (assuming using Visual C++
! 2012 under 64-bit Windows):
set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A
set INCLUDE=%WinSdk71%\Include;%INCLUDE%
set LIB=%WinSdk71%\Lib;%LIB%
set CL=/D_USING_V110_SDK71_
nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01
+ To target Windows XP x64 instead of x86, you need to change the settings of
+ LIB and SUBSYSTEM_VER:
+ ...
+ set LIB=%WinSdk71%\Lib\x64;%LIB%
+ ...
+ nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.02
+
+ If you use Visual C++ 2015 (either Express or Community Edition), executing
+ msvc2015.bat will set them automatically. For x86 builds run this without
+ options:
+ msvc2015
+ For x64 builds run this with the "x86_amd64" option:
+ msvc2015 x86_amd64
+
The following Visual C++ team blog can serve as a reference page:
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx
***************
*** 482,488 ****
E.g. C:\Program Files (x86)\Racket
DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes.
MZSCHEME_VER: Racket DLL version which is used for the file name.
! E.g. 3m_9z0ds0 for Racket 6.3.
The DLL can be found under the lib directory. E.g.
C:\Program Files
(x86)\Racket\lib\libracket3m_XXXXXX.dll
MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at
--- 498,504 ----
E.g. C:\Program Files (x86)\Racket
DYNAMIC_MZSCHEME: Whether dynamic linking is used. Usually, set to yes.
MZSCHEME_VER: Racket DLL version which is used for the file name.
! See below for a list of MZSCHEME_VER.
The DLL can be found under the lib directory. E.g.
C:\Program Files
(x86)\Racket\lib\libracket3m_XXXXXX.dll
MZSCHEME_COLLECTS: (Optional) Path of the collects directory used at
***************
*** 490,495 ****
--- 506,521 ----
User can override this with the PLTCOLLECTS environment
variable.
+ List of MZSCHEME_VER (incomplete):
+
+ Racket ver. | MZSCHEME_VER
+ ==========================
+ 6.3 | 3m_9z0ds0
+ 6.6 | 3m_a0solc
+ 6.8 | 3m_a1zjsw
+ 6.10 | 3m_a36fs8
+
+
E.g. When using MSVC (as one line):
nmake -f Make_mvc.mak
*** ../vim-8.0.1177/src/GvimExt/Makefile 2017-08-06 17:38:02.214007926
+0200
--- src/GvimExt/Makefile 2017-10-07 17:58:14.697770841 +0200
***************
*** 51,64 ****
# include CPUARG
cflags = $(cflags) $(CPUARG)
all: gvimext.dll
gvimext.dll: gvimext.obj \
gvimext.res
! # $(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib
! # $(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll)
shell32.lib gvimext.lib comctl32.lib gvimext.exp
! $(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $**
$(olelibsdll) shell32.lib comctl32.lib
! if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest
-outputresource:$*.dll;2
gvimext.obj: gvimext.h
--- 51,67 ----
# include CPUARG
cflags = $(cflags) $(CPUARG)
+ SUBSYSTEM = console
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ !endif
+
all: gvimext.dll
gvimext.dll: gvimext.obj \
gvimext.res
! $(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll
$** $(olelibsdll) shell32.lib comctl32.lib -subsystem:$(SUBSYSTEM)
! if exist $*.dll.manifest mt -nologo -manifest $*.dll.manifest
-outputresource:$*.dll;2
gvimext.obj: gvimext.h
*** ../vim-8.0.1177/src/Make_mvc.mak 2017-09-23 19:48:24.070218157 +0200
--- src/Make_mvc.mak 2017-10-07 17:58:14.697770841 +0200
***************
*** 587,593 ****
! endif
!endif
! # Pass CPUARG to GVimExt, to avoid using version-dependent defaults
MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) CPUARG="$(CPUARG)"
--- 587,593 ----
! endif
!endif
! # Pass CPUARG to GvimExt, to avoid using version-dependent defaults
MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) CPUARG="$(CPUARG)"
***************
*** 789,797 ****
--- 789,802 ----
CUI_INCL = iscygpty.h
CUI_OBJ = $(OUTDIR)\iscygpty.obj
!endif
+ SUBSYSTEM_TOOLS = console
!if "$(SUBSYSTEM_VER)" != ""
SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ SUBSYSTEM_TOOLS = $(SUBSYSTEM_TOOLS),$(SUBSYSTEM_VER)
+ # Pass SUBSYSTEM_VER to GvimExt and other tools
+ MAKEFLAGS_GVIMEXT = $(MAKEFLAGS_GVIMEXT) SUBSYSTEM_VER=$(SUBSYSTEM_VER)
+ MAKEFLAGS_TOOLS = $(MAKEFLAGS_TOOLS) SUBSYSTEM_VER=$(SUBSYSTEM_VER)
!endif
!if "$(GUI)" == "yes" && "$(DIRECTX)" == "yes"
***************
*** 1186,1209 ****
install.exe: dosinst.c
$(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
! user32.lib ole32.lib advapi32.lib uuid.lib
- if exist install.exe del install.exe
ren dosinst.exe install.exe
uninstal.exe: uninstal.c
! $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib
vimrun.exe: vimrun.c
! $(CC) /nologo -DNDEBUG vimrun.c
xxd/xxd.exe: xxd/xxd.c
cd xxd
! $(MAKE) /NOLOGO -f Make_mvc.mak
cd ..
tee/tee.exe: tee/tee.c
cd tee
! $(MAKE) /NOLOGO -f Make_mvc.mak
cd ..
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
--- 1191,1216 ----
install.exe: dosinst.c
$(CC) /nologo -DNDEBUG -DWIN32 dosinst.c kernel32.lib shell32.lib \
! user32.lib ole32.lib advapi32.lib uuid.lib \
! -link -subsystem:$(SUBSYSTEM_TOOLS)
- if exist install.exe del install.exe
ren dosinst.exe install.exe
uninstal.exe: uninstal.c
! $(CC) /nologo -DNDEBUG -DWIN32 uninstal.c shell32.lib advapi32.lib \
! -link -subsystem:$(SUBSYSTEM_TOOLS)
vimrun.exe: vimrun.c
! $(CC) /nologo -DNDEBUG vimrun.c -link -subsystem:$(SUBSYSTEM_TOOLS)
xxd/xxd.exe: xxd/xxd.c
cd xxd
! $(MAKE) /NOLOGO -f Make_mvc.mak $(MAKEFLAGS_TOOLS)
cd ..
tee/tee.exe: tee/tee.c
cd tee
! $(MAKE) /NOLOGO -f Make_mvc.mak $(MAKEFLAGS_TOOLS)
cd ..
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
*** ../vim-8.0.1177/src/tee/Make_mvc.mak 2016-02-02 18:47:03.000000000
+0100
--- src/tee/Make_mvc.mak 2017-10-07 17:58:14.701770818 +0200
***************
*** 1,10 ****
# A very (if not the most) simplistic Makefile for MSVC
CC=cl
CFLAGS=/O2 /nologo
tee.exe: tee.obj
! $(CC) $(CFLAGS) /Fo$@ $**
tee.obj: tee.c
$(CC) $(CFLAGS) /c $**
--- 1,15 ----
# A very (if not the most) simplistic Makefile for MSVC
+ SUBSYSTEM = console
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ !endif
+
CC=cl
CFLAGS=/O2 /nologo
tee.exe: tee.obj
! $(CC) $(CFLAGS) /Fo$@ $** /link /subsystem:$(SUBSYSTEM)
tee.obj: tee.c
$(CC) $(CFLAGS) /c $**
*** ../vim-8.0.1177/src/xxd/Make_mvc.mak 2010-05-15 13:04:06.000000000
+0200
--- src/xxd/Make_mvc.mak 2017-10-07 17:58:14.701770818 +0200
***************
*** 1,14 ****
# The most simplistic Makefile for Win32 using Microsoft Visual C++
# (NT and Windows 95)
xxd: xxd.exe
xxd.exe: xxd.c
! cl /nologo -DWIN32 xxd.c
# This was for an older compiler
# cl /nologo -DWIN32 xxd.c /link setargv.obj
clean:
! - if exist xxd.obj del xxd.obj
! - if exist xxd.exe del xxd.exe
--- 1,19 ----
# The most simplistic Makefile for Win32 using Microsoft Visual C++
# (NT and Windows 95)
+ SUBSYSTEM = console
+ !if "$(SUBSYSTEM_VER)" != ""
+ SUBSYSTEM = $(SUBSYSTEM),$(SUBSYSTEM_VER)
+ !endif
+
xxd: xxd.exe
xxd.exe: xxd.c
! cl /nologo -DWIN32 xxd.c -link -subsystem:$(SUBSYSTEM)
# This was for an older compiler
# cl /nologo -DWIN32 xxd.c /link setargv.obj
clean:
! - if exist xxd.obj del xxd.obj
! - if exist xxd.exe del xxd.exe
*** ../vim-8.0.1177/src/version.c 2017-10-07 17:35:04.229590525 +0200
--- src/version.c 2017-10-07 17:59:02.685496565 +0200
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1178,
/**/
--
In war we're tough and able.
Quite indefatigable
Between our quests
We sequin vests
And impersonate Clark Gable
It's a busy life in Camelot.
I have to push the pram a lot.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.