2011-12-19 22 views
3

我最近发现了关于clang_complete,并认为我会在MacVim中试一试。我在做iOS开发,并且在开始时我得到了UIKit/UIKit.h文件未找到的错误,像其他人一样经历过。clang_complete和iOS

我正在使用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

随机猜测:尝试添加“-m32”。

+0

试图将-m32添加到clang_user_options,它告诉我未知的参数。 – 2011-12-21 12:50:13

+0

哦......也许试试“-triple i386-apple-macosx10.7.0”? – servn 2011-12-21 17:41:49

0

我有类似的警告和错误,我增加CFNetwork框架和预警解决

0

您必须指定-target i386-apple-macosx10.8.0其中10.8.0应该是你的Mac OS版本。