Golevka / emacs-clang-complete-async

An emacs plugin to complete C and C++ code using libclang
360 stars 71 forks source link

Mac OS X w/ Xcode 4.6: 'clang-c/Index.h' file not found #18

Closed ghost closed 11 years ago

ghost commented 11 years ago

I've installed llvm using brew, but encountered another error while compiling

In file included from ./src/completion_serv.c:3:
./src/completion.h:5:10: fatal error: 'clang-c/Index.h' file not found
#include <clang-c/Index.h>
         ^
1 error generated.
make: *** [src/obj/completion_serv.o] Error 1

How can I install or find the required header and library? brew doesn't seem to have a formula for clang

GriffinSchneider commented 11 years ago

You need the clang/llvm source. svn checkout http://llvm.org/svn/llvm-project/cfe/trunk and then put that folder on your header search path - I just added a line like "CFLAGS += "-I/path/to/thing"" to makefile.mk.

KingOfBrian commented 11 years ago

brew install --with-clang --all-targets --rtti --universal --jit llvm worked for me too.

ghost commented 11 years ago

@KingOfBrian it works like a charm. thanks =)