On Mon, 27 May 2024 23:09:16 -0400
Salman Halim <salmanhalim@gmail.com> wrote:
> Hello,
>
> I'm trying to set up a new Windows 11 laptop and have followed the steps in
> INSTALLpc.txt after getting the latest Vim repository from git. When I try
> to compile with Python support, I get the following error and compilation
> stops. I'm hoping someone can tell me what to do about this.
>
> if_python.c:66:10: fatal error: Python.h: No such file or directory
> 66 | #include <Python.h>
> | ^~~~~~~~~~
> compilation terminated.
Your compiler is failing to find the python header file. MinGW doesn't
provide headers for Python. You'll have to provide it yourself.
Install Python. Install the version you want. Get the location of the
executable by running Python and then running these Python statements:
import sys
print(sys.executable)
Assume the output is: C:\Python\python.exe
Then go into C:\Python and you should see a include/ folder (also a lib/
folder, which will come into use later). There should be a Python.h
file, and all other Python-related header files, in this folder. Add
this folder to the include folders when running the compiler (-I flag).
You'll also have to add the lib/ folder to the library folders when
linking (-l flag). I can't remember the specific commands or flags.
Since you're building from source, I'm sure you know your C and GCC.
Good luck.
> My command-line (executed from inside vim/src):
>
> mingw32-make -f Make_ming.mak -j$NUMBER_OF_PROCESSORS GUI=yes FEATURES=HUGE
> PYTHON3=c:/Python312 PYTHON3_VER=312 PYTHON=c:/Python27 PYTHON_VER=27
> DYNAMIC_PYTHON=yes STATIC_STDCPLUS=yes DIRECTX=yes
>
> I've tried changing 'mingw32-make' to just 'make' and still get the same
> error. Running it with 'clean' instead of all the other parameters works as
> expected.
>
> I would appreciate any help here, please.
>
> Thank you and best regards,
>
--
Enan
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240603002938.00002012%40gmail.com.
Sunday, June 2, 2024
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment