2012-03-19 164 views
16

我试图用Vim的omnicompletion我的Python代码,但每当我尝试C-X + C-O,它会提示以下错误消息:运行时错误的Vim Omnicompletion

运行时错误!

方案E:\的Vim \ vim73 \的gvim.exe

R6034 应用程序已做出了尝试正确装载C运行时库。 有关更多信息,请联系应用程序的支持团队。

有谁请告诉我怎么解决这个问题!非常感谢!

回答

22

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

更新: 不是更新清单的.pyd文件。我尝试通过更新原始gvim清单,并使用python.exe清单中的一些更改直接更新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> 
+2

你是男人!非常感谢! – 2012-05-18 21:23:58

+2

+1这很荒谬,但它解决了这个问题。 – Hubro 2013-01-11 21:17:22

+0

由于我的环境,我有很多挣扎让vim和python在一起很好地玩。如上所述修改gvim的清单完全解决了我的问题。我不会想到这一点。谢谢! – Mark 2014-09-02 18:53:02

4

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

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

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

+2

感谢您的solution.In我的情况下仍然有效这是我最近安装了:) – Maciek 2014-07-11 09:31:53

+0

感谢@Maciek用于提的是CMake的,它是cmake的在我的情况也是如此。我只是从目录中删除了运行时DLL,因为它安装在我的系统上,所以不需要保留它。 – 2014-08-05 08:31:31

+0

非常感谢!我的工作目录中有msvcr90.dll导致我这个问题。 – randlet 2015-03-27 20:20:30