OSX Lion 中的内置 vim 版本已损坏,有时还会出现段错误,这似乎是一个已知问题。对我来说,当我打开不同文件的垂直和水平拆分组合并尝试保存其中一个时,就会发生这种情况。
我在以下位置找到了说明
http://www.jprabawa.com/2011/11/segmentation-fault-running-vim-on-os-x.html
它提供了有关如何安装不同版本的 vim 以解决问题的说明,但是当我运行 configure 时,出现以下错误:
jeff~/Documents/vim73$ ./configure --enable-gui=no
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/jeffreyhodes/Documents/vim73/src':
configure: error: C compiler cannot create executables
See `config.log' for more details.
我找不到config.log
文件。
在此期间我一直在使用 MacVim,但是拥有两个单独的应用程序来编辑和运行它们是一件很痛苦的事情。有没有人有任何智慧可以分享这个问题?
编辑:从 X-Code 4.3 安装命令行工具后,./configure 工作,但现在运行make
给出以下错误:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:120,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from os_macosx.m:19:
/System/Library/Frameworks/Foundation.framework/Headers/NSTask.h:75: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:9,
from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:10,
from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8,
from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:403: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:17,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:20: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:54,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingItem.h:52: error: syntax error before '^' token
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:73,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSSpellChecker.h:168: error: 'type name' declared as function returning a function
In file included from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:194,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
from os_macosx.m:19:
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: syntax error before '^' token
/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119: error: 'type name' declared as function returning a function
make[1]: *** [objects/os_macosx.o] Error 1
make: *** [first] Error 2
我已经通过命令行运行 macvim 暂时修复了这个问题mvim -v
,但是有人知道如何解决上述问题吗?