On Sun, Dec 21, 2008 at 8:32 PM, John Beckett <[email protected]>wrote:
> > Daniel Hast wrote: > > I downloaded the Vim 7.2 source from > > ftp://ftp.vim.org/pub/vim/pc/vim72src.zip > > You should patch it as well, and get the latest runtime. Patching is > quite easy, but it's a bit complex to describe (I'm hoping to do a wiki > page on it one day). I don't know a practical way to get the latest > runtime except by using rsync on a Unix-based system. > > > if_python.c: In function `PythonIO_Init': > > if_python.c:951: error: structure has no member named `ob_type' > > I don't know the details of what's going on, but ob_type is defined in a > Python header (look for a file like /Python30/include/object.h). > Somehow, the Vim compile is supposed to include object.h, or equivalent. > I'm giving this clue, in the hope that someone will explain what step > you are missing. Check how you are telling your compiler where your > Python is (try the make file). > > John > I checked, and if_python.c includes Python.h, which includes object.h. The include statements aren't inside any conditional blocks, either. I edited the make file to add PYTHON=c:\PROGRA~1\Python30, which is my Python directory. It seems like object.h is running, as far as I can tell. I got the latest runtime using AAP, and I applied all of the Vim 7.2 patches that apply to files that already existed. (I assume the other patches applied to different operating systems or something.) I tried compiling it again, and the same thing happened, with the exact same error message. The only difference was that the line numbers given in the error message were slightly higher due to the patches. 2008/12/21 <[email protected]> > [email protected] 写于 2008-12-22 06:49:52: > > I just started using Vim recently, and I've found it to be an > > extremely useful editor for Python. However, the self-installing Vim > > 7.2 executable is set up for use with Python 2.4, so it looks for > > python24.dll. Since it doesn't exist on my computer, I can't run any > > Python code in Vim. (Since Python 3.0 isn't backwards compatible, I > > can't just install Python 2.4, because then my programs wouldn't work.) > > > > Thanks, > > Daniel Hast > > Perhaps I've missed something, but as far as I know python3.0 is > incompatible with python 2.x and vim must be tailored towards Python 3.0 > before it can compile with python 3.0. > > Currently, vim is not designed to work with python 3.0 and it will not > compile on Python 3.0 unless you hack the vim code yourself to give it > python 3.0 support. > > Please correct me if I'm wrong. > -- > Regrads, > Pan, Shi Zhu > Python 3.0 is incompatible with Python 2.x, but that shouldn't be a problem for Vim, since it's not written in Python. I edited the make file to use the Python 3.0 files and DLLs; as far as I know, those contain everything Vim should need for Python 3.0 support. I think that the only problems arise when a Python program uses syntax that doesn't work in 3.0 or calls functions that were removed or substantially changed, so C programs shouldn't be affected. Daniel Hast --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
