Instructions: Replace the template text and remove irrelevant text (including this line)
Describe the bug
A clear and concise description of what the bug is.
(Issues related to the runtime files should be reported to their maintainer, check the file header.)
To Reproduce
Detailed steps to reproduce the behavior:
This leads to the following output:
`Microsoft (R) Program Maintenance Utility Version 14.28.29337.0
Copyright (C) Microsoft Corporation. All rights reserved.
Python requested (version 38) - root dir is "C:\Programs\WPy64-3860\python-3.8.6.amd64"
cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_CSCOPE -DFEAT_TERMINAL -DFEAT_SOUND -DFEAT_NETBEANS_INTG -DFEAT_JOB_CHANNEL -DFEAT_IPV6 -DFEAT_XPM_W32 -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /source-charset:utf-8 /MP -DHAVE_STDINT_H /Ox /GL -DNDEBUG /Zl /MT /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_MSWIN -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_PYTHON -DFEAT_HUGE /Fd.\ObjGXYAMD64/ /Zi /Fo.\ObjGXYAMD64/ /I "C:\Programs\WPy64-3860\python-3.8.6.amd64\Include" /I "C:\Programs\WPy64-3860\python-3.8.6.amd64\PC" if_python.c
if_python.c
if_python.c(81): warning C4005: 'PyBytes_Check': macro redefinition
C:\Programs\WPy64-3860\python-3.8.6.amd64\Include\bytesobject.h(48): note: see previous definition of 'PyBytes_Check'
c:\Users\thomas\Coding\vim\src\if_py_both.h(120): warning C4013: 'PyString_Check' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(123): warning C4013: 'PyString_AsStringAndSize' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(259): warning C4013: 'PyString_FromString' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(259): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(757): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(764): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(772): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(873): warning C4013: 'PyString_FromStringAndSize' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(875): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1076): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1157): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1167): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1641): error C2039: 'ob_type': is not a member of 'DictionaryObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1566): note: see declaration of 'DictionaryObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1832): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(1973): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(2383): error C2039: 'ob_type': is not a member of 'ListObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(2248): note: see declaration of 'ListObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(2468): warning C4133: 'function': incompatible types - from 'PySliceObject_T *' to 'PyObject *'
c:\Users\thomas\Coding\vim\src\if_py_both.h(2770): warning C4133: 'function': incompatible types - from 'PySliceObject_T *' to 'PyObject *'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3111): error C2039: 'ob_type': is not a member of 'FunctionObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(2932): note: see declaration of 'FunctionObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3131): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3302): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3422): warning C4013: 'PyInt_FromLong' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(3422): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3427): warning C4047: 'initializing': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3484): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3740): error C2039: 'ob_type': is not a member of 'TabPageObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3691): note: see declaration of 'TabPageObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3793): warning C4013: 'PyString_FromFormat' undefined; assuming extern returning int
c:\Users\thomas\Coding\vim\src\if_py_both.h(3793): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3800): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(3802): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4129): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4136): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4138): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4183): error C2039: 'ob_type': is not a member of 'WinListObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4156): note: see declaration of 'WinListObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5130): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5139): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5200): error C2039: 'ob_type': is not a member of 'BufferObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(4841): note: see declaration of 'BufferObject'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5254): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5382): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5390): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(5778): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6386): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6420): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6459): error C2065: 'OutputGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6460): error C2065: 'OutputSetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6461): error C2065: 'call_PyType_GenericAlloc': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6461): warning C4047: '=': 'allocfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6462): error C2065: 'call_PyType_GenericNew': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6462): warning C4047: '=': 'newfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6463): error C2065: 'call_PyObject_Free': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6463): warning C4047: '=': 'freefunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6494): error C2065: 'BufferGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6495): error C2065: 'BufferSetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6496): error C2065: 'call_PyType_GenericAlloc': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6496): warning C4047: '=': 'allocfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6497): error C2065: 'call_PyType_GenericNew': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6497): warning C4047: '=': 'newfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6498): error C2065: 'call_PyObject_Free': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6498): warning C4047: '=': 'freefunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6515): error C2065: 'WindowGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6516): error C2065: 'WindowSetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6517): error C2065: 'call_PyType_GenericAlloc': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6517): warning C4047: '=': 'allocfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6518): error C2065: 'call_PyType_GenericNew': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6518): warning C4047: '=': 'newfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6519): error C2065: 'call_PyObject_Free': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6519): warning C4047: '=': 'freefunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6534): error C2065: 'TabPageGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6535): error C2065: 'call_PyType_GenericAlloc': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6535): warning C4047: '=': 'allocfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6536): error C2065: 'call_PyType_GenericNew': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6536): warning C4047: '=': 'newfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6537): error C2065: 'call_PyObject_Free': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6537): warning C4047: '=': 'freefunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6578): error C2065: 'RangeGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6579): error C2065: 'call_PyType_GenericAlloc': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6579): warning C4047: '=': 'allocfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6580): error C2065: 'call_PyType_GenericNew': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6580): warning C4047: '=': 'newfunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6581): error C2065: 'call_PyObject_Free': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6581): warning C4047: '=': 'freefunc' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6593): error C2065: 'CurrentGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6594): error C2065: 'CurrentSetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6613): error C2065: 'DictionaryGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6614): error C2065: 'DictionarySetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6633): error C2065: 'ListGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6634): error C2065: 'ListSetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6652): error C2065: 'FunctionGetattro': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6680): error C2065: 'vimmodule': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6681): error C2065: 'vimmodule': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6681): error C2224: left of '.m_name' must have struct/union type
c:\Users\thomas\Coding\vim\src\if_py_both.h(6682): error C2065: 'vimmodule': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6682): error C2224: left of '.m_doc' must have struct/union type
c:\Users\thomas\Coding\vim\src\if_py_both.h(6683): error C2065: 'vimmodule': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6683): error C2224: left of '.m_size' must have struct/union type
c:\Users\thomas\Coding\vim\src\if_py_both.h(6684): error C2065: 'vimmodule': undeclared identifier
c:\Users\thomas\Coding\vim\src\if_py_both.h(6684): error C2224: left of '.m_methods' must have struct/union type
c:\Users\thomas\Coding\vim\src\if_py_both.h(6930): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
c:\Users\thomas\Coding\vim\src\if_py_both.h(6867): warning C4047: 'initializing': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(930): warning C4133: 'function': incompatible types - from 'char *' to 'const wchar_t *'
if_python.c(1181): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1185): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1187): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1188): warning C4013: 'Py_FindMethod' undefined; assuming extern returning int
if_python.c(1188): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1248): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1292): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1332): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1352): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1434): warning C4133: 'function': incompatible types - from 'char *[2]' to 'wchar_t **'
if_python.c(1436): warning C4013: 'Py_InitModule4' undefined; assuming extern returning int
if_python.c(1437): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1465): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1469): warning C4013: 'PyString_AsString' undefined; assuming extern returning int
if_python.c(1469): warning C4047: '=': 'char *' differs in levels of indirection from 'int'
if_python.c(1491): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1493): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1497): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1504): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1508): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
if_python.c(1521): warning C4047: 'return': 'PyObject *' differs in levels of indirection from 'int'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop.`
Expected behavior
The build should run through. (Note that the build DOES work without the PYTHON options!)
Screenshots
If applicable, copy/paste the text or add screenshots to help explain your problem.
Environment (please complete the following information):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
try the official python: https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe That is what is used for the vim-win32-installer repository and this one works.
You are specifying PYTHON and PYTHON_VER options, but you should use PYTHON3 and PYTHON3_VER options instead.
Adding DYNAMIC_PYTHON3=yes might be better.
Closed #7842.
Hello, I am trying to do the same thing, but without the dynamic option and the compilation fails on both python2 and python3. These are my commands for the compilation using VS:
Python2: nmake -f Make_mvc.mak GUI=yes PYTHON=C:\Users\gou\Miniconda3\envs\py27 PYTHON_VER=27
Python3: nmake -f Make_mvc.mak GUI=yes PYTHON3=C:\Users\gou\Miniconda3 PYTHON3_VER=37
...
if_python3.obj : error LNK2001: Nicht aufgelöstes externes Symbol "__imp__PyEval_RestoreThread".
gvim.exe : fatal error LNK1120: 105 nicht aufgelöste Externe
NMAKE : fatal error U1077: ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.EXE"": Rückgabe-Code "0x460"
Stop.
There are many LNK2001 errors, but i cut them off to not spam the window. The win32 installer provides Python support, but only dynamic, which doesn't seem to be acceptable for some plugins, i.e. vimspector.
Does anyone have an idea how to fix the problem? It seems to be a Windows issue (surprise surprise) because i compiled vim fine on linux. The win32 installer provides Python support, but only dynamic, which doesn't seem to be acceptable for some plugins, i.e. vimspector.
Thanks in advance.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
Am 12.09.2021 um 13:16 schrieb Hristo <vim-dev...@256bit.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 vim_dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/7842/917615284%40github.com.
can you please try with official python package and not some other distrution?
The win32 installer provides Python support, but only dynamic, which doesn't seem to be acceptable for some plugins, i.e. vimspector.
I don't think this is true. you should be able to simply load the library and then it should work. Ping @puremourning please correct me if I am wrong. Thanks!
—
You are receiving this because you are subscribed to this thread.
@chrisbra you're not wrong... I only ever use your builds of vim for windows and they work fine with vimspector and YCM
—
You are receiving this because you are subscribed to this thread.
Hello,
thanks a lot for the prompt responses, and amazing work @puremourning :).
Unfortunately for me, Vim installed via the Windows installer (with both versions of Python included dynamically) gives me a warning that vimspector needs the +python3 option. I tried doing some basic things like setting a breakpoint or installing an adapter after closing the warning, but nothing happens, so i assume that the plugin is not loaded. Can it really be due to the fact that my python installation is not in C:? I'd prefer to stick to the conda environment if it's possible.
Thanks in advance.
—
You are receiving this because you are subscribed to this thread.
you may need to set the :set pythonthreedll=c:\path\to\python\dll. Just make sure that if you use a 32bit vim you also use the 32bit python dll. I am not sure if miniconda/anaconda will always work.
—
You are receiving this because you are subscribed to this thread.
start vim with gvim -Nu NONE and run :py3 pass. If this doesn't work, then python3 plugins won't work.
It's likely that either:
The simplest way to double-check this and make it work is to :set pythonthreedll=<path> where <path> is the path to the actual python36.dll in your python installation.
—
You are receiving this because you are subscribed to this thread.
I got it working :) :) Thanks a lot.
Now i'm having an issue with the vscode-cpptools adapter. During installation the archive is extracted, then removed, and then the installation crashes because a file in the now removed directory doesn't exist.
If you know the answer right away that'd great, but if this should be put in a new issue, then i'd be happy to do that.
—
You are receiving this because you are subscribed to this thread.
That is a vimspector-related question, not a vim-related question. Check the Vimspector docs and contributing guide for how to go about it.
—
You are receiving this because you are subscribed to this thread.
Awesome, thank you. :)
—
You are receiving this because you are subscribed to this thread.