3

I recently found out about clang_complete and thought I'd give it a try in MacVim. I'm doing iOS dev and at the beginning I got the UIKit/UIKit.h file not found error like others have experienced.

I'm using Xcode 4.2 with the iOS 5 SDK. I've added the following to 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'

However now I'm getting the following errors whenever I trigger the autocompletion:

/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

Any idea how to solve this?

Peeter Joot
  • 7,848
  • 7
  • 48
  • 82
Stelian Iancu
  • 2,462
  • 3
  • 18
  • 28

3 Answers3

0

i had similar warning and error i added CFNetwork framework and warning resolved

iMeMyself
  • 1,649
  • 13
  • 28
0

You have to specify -target i386-apple-macosx10.8.0 where 10.8.0 should be your Mac OS version.

abyss.7
  • 13,882
  • 11
  • 56
  • 100
0

Random guess: try adding "-m32".

servn
  • 3,049
  • 14
  • 8