gpt4 book ai didi

python - Vim Omnicompletion 的运行时错误

转载 作者:太空狗 更新时间:2023-10-29 16:53:34 25 4
gpt4 key购买 nike

我试图在我的 Python 代码中使用 Vim 的 omnicompletion,但每当我尝试 C-x + C-o 时,它都会提示以下错误消息:

Runtime Error!

Program E:\Vim\vim73\gvim.exe

R6034An application has made an attempt to load the C runtime library incorrectly.Please contact the application's support team for more information.

谁能告诉我如何解决这个问题!非常感谢!

最佳答案

我有同样的问题,是 gvim 无法加载 python pyd dll 引起的。有一些技巧可以解决导致上述问题的 .pyd dll。我不确定是否有任何方法可以解决所有 dll 的运行时错误。引用Not embed the correct manifest for the msvc runtimes on windows有关如何解决您的问题的链接。

更新:而不是更新 .pyd 文件的 list 。我尝试通过使用 python.exe list 中的一些更改更新原始 gvim list 来直接更新 gvim 的 list 。

# dump manifest from gvim.exe
>> mt.exe -inputresource:gvim.exe;#1 -out:gvim.manifest

# dump manifest from python.exe
# *I use python26 for gvim, default gvim come with python27
>> mt.exe -inputresource:c:\python26\python.exe;#1 -out:python.manifest

# manually edit gvim.manifest, just change the line with dependentAssembly with
# line from the python.manifest which will depend on VC90.CRT
# Then, update the edited manifest into gvim.exe
>> mt.exe -manifest gvim.manifest -outputresource:gvim.exe;1

下面是我编辑的 gvim.manifest:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity processorArchitecture="*" version="7.3.0.0" type="win32" name="Vim"></assemblyIdentity>
<description>Vi Improved - A Text Editor</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>

<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>

<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

关于python - Vim Omnicompletion 的运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9764341/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com