[patch][win32] Improve building with VC2015

50 views
Skip to first unread message

Ken Takata

unread,
Sep 21, 2017, 11:05:33 AM9/21/17
to vim_dev
Hi,

I wrote a patch for improving VC2015 support.

* Add src/msvc2015.bat.
* Update makefiles so that subsystem version can be properly specified.
(gvimext.dll, install.exe, uninstal.exe, tee.exe and xxd.exe)
* Update src/INSTALLpc.txt.
(Also includes updated description of MZSCHEME_VER.)

According to *new-msvc-windows-xp* in INSTALLpc.txt, we need some settings
for targeting Windows XP using VC2012 or later. However, the settings were
not so easy. msvc2015.bat makes it easier.

Regards,
Ken Takata

win32-improve-vc2015-support.patch

Bram Moolenaar

unread,
Sep 21, 2017, 4:16:44 PM9/21/17
to vim...@googlegroups.com, Ken Takata
Thanks, I'll check it out next week.


--
In Joseph Heller's novel "Catch-22", the main character tries to get out of a
war by proving he is crazy. But the mere fact he wants to get out of the war
only shows he isn't crazy -- creating the original "Catch-22".

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

Bram Moolenaar

unread,
Oct 7, 2017, 3:44:43 PM10/7/17
to vim...@googlegroups.com, Ken Takata
Building works for console and gvim, now I'm trying to build with
interfaces.

The instructions for Ruby say:
cd ruby
win32\configure.bat

For me this always fails with:
win32\rtname: conftest.exe is not linked to msvcrt

Even though it just build. Any way to fix this or work around it?
I installed Ruby 2.2.6 and now using msvc 2015.

--
A cow comes flying over the battlements, lowing aggressively. The cow
lands on GALAHAD'S PAGE, squashing him completely.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

Ken Takata

unread,
Oct 7, 2017, 3:54:10 PM10/7/17
to vim_dev
Hi Bram,

2017/10/8 Sun 4:44:43 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
>
> > I wrote a patch for improving VC2015 support.
> >
> > * Add src/msvc2015.bat.
> > * Update makefiles so that subsystem version can be properly specified.
> > (gvimext.dll, install.exe, uninstal.exe, tee.exe and xxd.exe)
> > * Update src/INSTALLpc.txt.
> > (Also includes updated description of MZSCHEME_VER.)
> >
> > According to *new-msvc-windows-xp* in INSTALLpc.txt, we need some settings
> > for targeting Windows XP using VC2012 or later. However, the settings were
> > not so easy. msvc2015.bat makes it easier.
>
> Building works for console and gvim, now I'm trying to build with
> interfaces.
>
> The instructions for Ruby say:
> cd ruby
> win32\configure.bat
>
> For me this always fails with:
> win32\rtname: conftest.exe is not linked to msvcrt
>
> Even though it just build. Any way to fix this or work around it?
> I installed Ruby 2.2.6 and now using msvc 2015.

Unfortunately, Ruby 2.3 or earlier cannot be built by VC2015 or later.
Only Ruby 2.4 (or later) can be built by VC2015 or later.

Regards,
Ken Takata

Bram Moolenaar

unread,
Oct 7, 2017, 4:22:03 PM10/7/17
to vim...@googlegroups.com, Ken Takata
Aha, that's why I didn't manage to figure it out. I'll change the
instructions to use Ruby 2.4 by default, since it will now also
recomment MSVC 2015.

Next problem is that TCL doesn't work:
libcmt.lib(initializers.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflict
s with use of other libs; use /NODEFAULTLIB:library
msvcrt.lib(_chandler4gs_.obj) : error LNK2001: unresolved external symbol __exce
pt_handler4_common


--
Ten bugs in the hand is better than one as yet undetected.

Ken Takata

unread,
Oct 7, 2017, 9:12:27 PM10/7/17
to vim_dev
Hi Bram,

ActiveTcl should be also updated to 8.6.6. That's the reason why I had to
update the compiler to VC2015 on the vim-win32-installer repository.

You might also need an additional build option: TCL_DLL=tcl86t.dll
(Actually, I don't set this on vim-win32-installer yet. When I tried to set
it, if_tcl couldn't find the DLL on AppVeyor but it worked on my local PC.
Not sure what's happen.)

Regards,
Ken Takata

Ken Takata

unread,
Oct 7, 2017, 11:49:34 PM10/7/17
to vim_dev
Hi Bram,

I thought I had sent the following patch about TCL_DLL:

--- a/src/INSTALLpc.txt
+++ b/src/INSTALLpc.txt
@@ -721,6 +721,10 @@ When building, you need to set the follo
TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X.
TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X.

+Sometimes the Tcl dll name changes. E.g. ActiveTcl 8.6.4 comes with tcl86.dll
+but ActiveTcl 8.6.6 comes with tcl86t.dll. You can set the dll name by settin
+the TCL_DLL variable. (Default: tcl86.dll)
+
E.g. When using MSVC (as one line):

nmake -f Make_mvc.mak


But this was not included in v8.0.0989.
Isn't this or something similar description needed?

Regards,
Ken Takata

Bram Moolenaar

unread,
Oct 8, 2017, 9:41:40 AM10/8/17
to vim...@googlegroups.com, Ken Takata
It's there in my local version. I'll make some more changes for MSVC
2015 to help users pick the right version of everything.

--
Error:015 - Unable to exit Windows. Try the door.

Bram Moolenaar

unread,
Oct 8, 2017, 9:41:40 AM10/8/17
to vim...@googlegroups.com, Ken Takata
Thanks, I deleted all existing tcl versions and installed 8.6.6 (32 bit
version) and that worked.

> You might also need an additional build option: TCL_DLL=tcl86t.dll
> (Actually, I don't set this on vim-win32-installer yet. When I tried to set
> it, if_tcl couldn't find the DLL on AppVeyor but it worked on my local PC.
> Not sure what's happen.)

I do need to add that, otherwise Vim looks for tcl86.dll, while the
distribution has tcl86t.dll. Not sure what the "t" stands for.

Now I'll give Lua a try...

--
In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975
of them are to be found in the United States.
Reply all
Reply to author
Forward
0 new messages