On Tuesday, September 18, 2012 12:27:22 PM UTC-4, Bram Moolenaar wrote:
> Patch 7.3.665
> 
> Problem:    MSVC 11 is not supported.
> 
> Solution:   Recognize MSVC 11. (Raymond Ko)
> 
> Files:            src/Make_mvc.mak
> 
> 
> 
> 
> 
> *** ../vim-7.3.664/src/Make_mvc.mak   2012-09-05 17:57:34.000000000 +0200
> 
> --- src/Make_mvc.mak  2012-09-18 18:24:48.000000000 +0200
> 
> ***************
> 
> *** 395,400 ****
> 
> --- 395,403 ----
> 
>   !if "$(_NMAKE_VER)" == "10.00.30319.01"
> 
>   MSVCVER = 10.0
> 
>   !endif
> 
> + !if "$(_NMAKE_VER)" == "11.00.50727.1"
> 
> + MSVCVER = 11.0
> 
> + !endif
> 
>   !endif
> 
>   
> 
>   # Abort bulding VIM if version of VC is unrecognised.
> 
> ***************
> 
> *** 409,415 ****
> 
>   !endif
> 
>   
> 
>   # Convert processor ID to MVC-compatible number
> 
> ! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != 
> "10.0")
> 
>   !if "$(CPUNR)" == "i386"
> 
>   CPUARG = /G3
> 
>   !elseif "$(CPUNR)" == "i486"
> 
> --- 412,418 ----
> 
>   !endif
> 
>   
> 
>   # Convert processor ID to MVC-compatible number
> 
> ! !if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != 
> "10.0") && ("$(MSVCVER)" != "11.0")
> 
>   !if "$(CPUNR)" == "i386"
> 
>   CPUARG = /G3
> 
>   !elseif "$(CPUNR)" == "i486"
> 
> ***************
> 
> *** 443,449 ****
> 
>   OPTFLAG = /Ox
> 
>   !endif
> 
>   
> 
> ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == 
> "10.0")
> 
>   # Use link time code generation if not worried about size
> 
>   !if "$(OPTIMIZE)" != "SPACE"
> 
>   OPTFLAG = $(OPTFLAG) /GL
> 
> --- 446,452 ----
> 
>   OPTFLAG = /Ox
> 
>   !endif
> 
>   
> 
> ! !if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == 
> "10.0") || ("$(MSVCVER)" == "11.0")
> 
>   # Use link time code generation if not worried about size
> 
>   !if "$(OPTIMIZE)" != "SPACE"
> 
>   OPTFLAG = $(OPTFLAG) /GL
> 
> *** ../vim-7.3.664/src/version.c      2012-09-18 18:03:33.000000000 +0200
> 
> --- src/version.c     2012-09-18 18:26:16.000000000 +0200
> 
> ***************
> 
> *** 721,722 ****
> 
> --- 721,724 ----
> 
>   {   /* Add new patch number below this line */
> 
> + /**/
> 
> +     665,
> 
>   /**/
> 
> 
> 
> -- 
> 
> There are 10 kinds of people: Those who understand binary and those who don't.
> 
> 
> 
>  /// 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    ///

Actually the credit for this should go to this guy @ 
http://kalekold.net/index.php?post=23

These changes aren't enough since for some reason Microsoft decided not to 
include Win32.mak in their newest SDK for Visual Studio 2012. As a result, 
common programs like "link" ($link) and their respective options ($linkdebug) 
are not defined, and causes compilation to fail.

To clarify, calling C:\Program Files (x86)\Microsoft Visual Studio 
10.0\VC\vcvarsall.bat does set an SDK path with Win32.mak that nmake can find, 
but C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat does 
not. This affects src/Make_mvc.mak and src/GvimExt/Makefile

kalekold's workaround is to prefix the places where Win32.mak with a variable 
and have the user set that manually. I think it should be something like this 
to account for both cases:

!ifdef SDK_INCLUDE_DIR
!include $(SDK_INCLUDE_DIR)\Win32.mak
!else
!include <Win32.mak>
!endif

Testing this with VC10 and VC11 indicates that it does work. I then guess a 
note can be put somewhere which says if you have VC11 to set SDK_INCLUDE_DIR to 
something like "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include", which is 
where the latest SDK with Win32.mak is installed in my machine.

-- 
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

Raspunde prin e-mail lui