if_python build on mingw32/mingw64(msys2)

119 views
Skip to first unread message

mattn

unread,
Nov 26, 2015, 7:05:18 AM11/26/15
to vim_dev
Currently, we can't build if_python on windows with python2 or python3 that is provided from mingw32/mingw64 on msys2.
Most of users download python from https://www.python.org/. And link to library made by msvc.

Below is a patch to enable link to library provided from mingw32/mingw64 on msys2.

https://gist.githubusercontent.com/mattn/4f17789cdc0ec1ad17e9/raw/149ab7e82e6801fcd916956acc8a873b924fa192/gistfile1.diff

You can build vim.exe/gvim.exe with if_python like below.

mingw32-make -f Make_ming.mak GUI=no IME=yes MBYTE=yes ICONV=yes DEBUG=no PYTHON=c:/msys64/mingw64 PYTHON_HOME=c:/msys64/mingw64 PYTHONINC=-Ic:/msys64/mingw64/include/python2.7 DYNAMIC_PYTHON=yes PYTHON_VER=27 DYNAMIC_PYTHON_DLL=libpython2.7.dll ARCH=x86-64 STATIC_STDCPLUS=yes %*

For example, cpsm (https://github.com/nixprime/cpsm) doesn't work with conbination of mingw-gcc and python2 that is downloaded from python official site. But this fix the problem.

- mattn

Bram Moolenaar

unread,
Nov 28, 2015, 4:56:22 PM11/28/15
to mattn, vim_dev
Thanks. Perhaps that example can be added to one of the INSTALL files?

--
hundred-and-one symptoms of being an internet addict:
146. You experience ACTUAL physical withdrawal symptoms when away
from your 'puter and the net.

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

mattn

unread,
Nov 29, 2015, 8:52:29 AM11/29/15
to vim_dev, matt...@gmail.com
Reply all
Reply to author
Forward
0 new messages