Permalink
Browse files

patch 8.0.0756: cannot build libvterm with MSVC

Problem:    Cannot build libvterm with MSVC.
Solution:   Add an MSVC Makefile to libvterm. (Yasuhiro Matsumoto, closes
            #1865)
  • Loading branch information...
brammool committed Jul 23, 2017
1 parent 26af85d commit 2aeaf3fc013a3c4828d6e98a80e6a2e2d980f109
Showing with 48 additions and 6 deletions.
  1. +7 −4 src/INSTALLpc.txt
  2. +9 −2 src/Make_mvc.mak
  3. +30 −0 src/libvterm/Makefile.msc
  4. +2 −0 src/version.c
View
@@ -706,17 +706,20 @@ Or when using MinGW (as one line):
13. Building with Terminal support
==================================
Vim with Terminal support can be built with MinGW or Cygwin.
Terminal support require winpty which provide following two files.
Vim with Terminal support can be built with either MSVC, or MinGW or Cygwin.
This uses the included libvterm and winpty. No extra header files or
libraries are needed for building.
Running Vim with terminal support requires the following two winpty files:
winpty.dll
winpty-agent.dll
You can download following page:
You can download them from the following page:
https://github.com/rprichard/winpty
It don't need header files or libraries. Just put them on your PATH.
Just put the DLL files somewhere in your PATH.
14. Windows 3.1x
View
@@ -36,6 +36,8 @@
# is yes)
# Global IME support: GIME=yes (requires GUI=yes)
#
# Terminal support: TERMINAL=yes (default is no)
#
# Lua interface:
# LUA=[Path to Lua directory]
# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
@@ -354,7 +356,8 @@ CSCOPE_DEFS = -DFEAT_CSCOPE
!if "$(TERMINAL)" == "yes"
TERMINAL_OBJ = $(OBJDIR)/terminal.obj
TERMINAL_DEFS = -DFEAT_TERMINAL
TERMINAL_SRC = terminal.c
TERMINAL_SRC = terminal.c
VTERM_LIB = libvterm/vterm.lib
!endif
!ifndef NETBEANS
@@ -1130,7 +1133,7 @@ conflags = $(conflags) /map /mapinfo:lines
LINKARGS1 = $(linkdebug) $(conflags)
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
$(TCL_LIB) $(NETBEANS_LIB) $(VTERM_LIB) $(XPM_LIB) $(LINK_PDB)
# Report link time code generation progress if used.
!ifdef NODEBUG
@@ -1544,5 +1547,9 @@ proto.h: \
.c.i:
$(CC) $(CFLAGS) /P /C $<
libvterm/vterm.lib :
cd libvterm
$(MAKE) /NOLOGO -f Makefile.msc
cd ..
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:
View
@@ -0,0 +1,30 @@
OBJS = \
src\encoding.c \
src\keyboard.c \
src\mouse.c \
src\parser.c \
src\pen.c \
src\screen.c \
src\state.c \
src\unicode.c \
src\vterm.c
OBJS = \
src\encoding.obj \
src\keyboard.obj \
src\mouse.obj \
src\parser.obj \
src\pen.obj \
src\screen.obj \
src\state.obj \
src\unicode.obj \
src\vterm.obj
all : vterm.lib
.c.obj :
cl /DINLINE= /Iinclude /Fo$@ /c $<
vterm.lib : $(OBJS)
lib /OUT:$@ $(OBJS)
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
756,
/**/
755,
/**/

6 comments on commit 2aeaf3f

@Snaptags

This comment has been minimized.

Show comment
Hide comment
@Snaptags

Snaptags Jul 24, 2017

Does not work for me (using MS Visual Studio 2017):

LINK : fatal error LNK1181: cannot open input file 'libvterm/vterm.lib'

By the way: shouldn't it be "winpty-agent.exe" in the INSTALLpc.txt? Cannot find a dll anywhere …

Snaptags replied Jul 24, 2017

Does not work for me (using MS Visual Studio 2017):

LINK : fatal error LNK1181: cannot open input file 'libvterm/vterm.lib'

By the way: shouldn't it be "winpty-agent.exe" in the INSTALLpc.txt? Cannot find a dll anywhere …

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Jul 24, 2017

@Snaptags If you use Make_mvc.mak, libvterm\vterm.lib should be built.

2aeaf3f#diff-45901e1d4f9cbd177bb2090bc233f6abR1550

mattn replied Jul 24, 2017

@Snaptags If you use Make_mvc.mak, libvterm\vterm.lib should be built.

2aeaf3f#diff-45901e1d4f9cbd177bb2090bc233f6abR1550

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Jul 24, 2017

Also did you read INSTALLpc.txt? You should download from https://github.com/rprichard/winpty/releases

mattn replied Jul 24, 2017

Also did you read INSTALLpc.txt? You should download from https://github.com/rprichard/winpty/releases

@Snaptags

This comment has been minimized.

Show comment
Hide comment
@Snaptags

Snaptags Jul 24, 2017

Yes I did, but there is no "winpty-agent.dll" in the release downloads. Seems to be a copy and paste error in INSTALLpc.txt, because using "winpty-agent.exe" everything is working just fine.

Don't know what's wrong with my build environment. I'm triggering a manual libvterm build now, works for me...

Snaptags replied Jul 24, 2017

Yes I did, but there is no "winpty-agent.dll" in the release downloads. Seems to be a copy and paste error in INSTALLpc.txt, because using "winpty-agent.exe" everything is working just fine.

Don't know what's wrong with my build environment. I'm triggering a manual libvterm build now, works for me...

@k-takata

This comment has been minimized.

Show comment
Hide comment
@k-takata
Member

k-takata replied Jul 24, 2017

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Jul 24, 2017

Ah, good catch. Thank you

mattn replied Jul 24, 2017

Ah, good catch. Thank you

Please sign in to comment.