【问题标题】:Runtime Error with Vim OmnicompletionVim Omnicompletion 的运行时错误
【发布时间】:2014-03-24 10:31:09
【问题描述】:

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

运行时错误!

程序 E:\Vim\vim73\gvim.exe

R6034 应用程序试图错误地加载 C 运行时库。 请联系应用程序的支持团队了解更多信息。

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

【问题讨论】:

    标签: python vim autocomplete runtime-error


    【解决方案1】:

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

    更新: 而不是更新 .pyd 文件的清单。我尝试通过从 python.exe 清单中进行一些更改来更新原始 gvim 清单来直接更新 gvim 清单。

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

    【讨论】:

    • +1 不得不走到这一步很荒谬,但这解决了问题。
    • 由于我的环境,我在让 vim 和 python 很好地协同工作时遇到了很多困难。如上所述修改 gvim 的清单完全解决了我的问题。我不会想到这一点。谢谢!
    • 对于vim74在2015年仍然有效
    【解决方案2】:

    我遇到了同样的问题(Windows 7),我可以通过从我的 PATH 变量中删除包含 msvcr90.dll 的路径来解决它。

    删除多个条目后,错误停止弹出。不幸的是,我没有记下我删除了哪些条目。但它是 C:\Program Files (x86)\OpenVPN\bin 和其他几个,包括 Windows Live。

    我得到了关于从这里(页面底部)的路径中寻找问题的提示:https://bitbucket.org/Haroogan/vim-youcompleteme-for-windows/src

    【讨论】:

    • 感谢您的解决方案。在我的情况下,我最近安装的是 cmake :)
    • 感谢@Maciek 提到这一点,在我的情况下也是 cmake。我只是从其目录中删除了运行时 dll,因为它已安装在我的系统上,因此无需将其保留在那里。
    • 非常感谢!我的工作目录中有 msvcr90.dll,这导致了我这个问题。
    • 这对我有用。出于某种莫名其妙的原因,语义云端点保护或类似的爵士乐在我的道路上出现了这种情况。
    猜你喜欢
    • 2011-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-20
    • 2011-02-05
    相关资源
    最近更新 更多