我最近发现了clang_complete,并且认为我会在MacVim上尝试一下。我正在做iOS开发,一开始我得到的UIKit / UIKit.h文件没有像其他人那样发现错误。
我正在使用Xcode 4.2和iOS 5 SDK。我已将以下内容添加到clang_user_options:
let g:clang_user_options='-fblocks -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000'
但是现在每当我触发自动完成时,我都会收到以下错误:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h|36 col 9 error| mac68k alignment pragma is not supported on this target
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFUtilities.h|14 col 39 error| expected function body after function declarator
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h|92 col 10 error| 'CoreFoundation/CFUserNotification.h' file not found
知道如何解决这个问题吗?
答案 0 :(得分:0)
随机猜测:尝试添加“-m32”。
答案 1 :(得分:0)
我有类似的警告和错误,我添加了CFNetwork框架和警告解决
答案 2 :(得分:0)
您必须指定-target i386-apple-macosx10.8.0
,其中10.8.0应该是您的Mac OS版本。