2
這似乎是一個已知問題,OSX Lion中的vim的內置版本已損壞,有時會出現段錯誤。對我而言,當我打開不同文件的垂直和水平拆分組合並嘗試保存其中一個文件時,會發生這種情況。打開多個拆分後,Vim在OSX Lion中進行了segfaulting
我發現說明在
http://www.jprabawa.com/2011/11/segmentation-fault-running-vim-on-os-x.html
給出關於如何安裝不同版本的VIM來解決問題的指示,但是當我運行配置,我得到以下錯誤:
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-代碼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
命令行,但沒有人知道如何解決上述問題?
你已經安裝的Xcode?如果它是4.3.x,您是否從其首選項對話框安裝了命令行工具包?如果它是4.2.x,您是否運行了「安裝Xcode.app」,這是App Store或可下載安裝程序實際創建的? (遺憾的是,不完整的Xcode安裝可能會給你一個完全沒用的'/ usr/bin/gcc'。) – geekosaur 2012-04-23 06:13:00
Macvim也可以在終端中運行:http://stackoverflow.com/questions/2056137/how-to-run -mvim-macvim-terminal- – 2012-04-23 06:18:15
geekosaur:我有4.3.x,結果證明我沒有安裝開發工具。這樣做給我一個關於make的錯誤:'/System/Library/Frameworks/AppKit.framework/Headers/NSWindowRestoration.h:119:error:'type name'declared as function as function returns a function',which confitting me。大衛:這很好,謝謝!使用終端macvim而不是正常的vim有什麼缺點嗎? – Jeffrey 2012-04-23 06:28:18