xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.96k stars 308 forks source link

Clang Complete not using definitions of my own Objective-C project? #211

Open Goles opened 11 years ago

Goles commented 11 years ago

Hello,

My .clang_complete file looks like this:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
-F /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks
-I /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/include
-D __MACH__
-D __APPLE_CC__
-D __IPHONE_OS_VERSION_MIN_REQUIRED=40300
-fblocks
-fobjc-nonfragile-abi
-fno-builtin
-m32
-fobjc-arc
-include Prototype/Prefix.pch
-Wall
-Wextra
-Wno-arc
-I ./Classes
-I ./src
-I ./libs

Right now I get Objectice-C completion in my project, the problem is that I'm not getting any sort of completion for the definitions inside my project.

For example, I'm using the Cocos2d Game Engine, which is located under:

PrototypeFolder/Prototype/libs/cocos2d

But if I type

CCN ( which should complete to CCNode and lot's of stuff ), I get nothing.

How can I fix this ?

Thanks!

ethercrow commented 11 years ago

You should try compiling with binary clang using the same flags as your .clang_complete has. Most likely you will see some meaningful error, e.g. Cocos2D headers are not in includepath.