Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use compile_commands.json? #65

Closed
pfsun opened this issue Oct 31, 2014 · 1 comment
Closed

How to use compile_commands.json? #65

pfsun opened this issue Oct 31, 2014 · 1 comment

Comments

@pfsun
Copy link

pfsun commented Oct 31, 2014

I just learn how to wirte clang libtooling. Bear project is very helpful for me. Thanks.
Now I have installed Bear and create the file compile_commands.json by compiling eglibc source code. But when I use libtooling to analyze file, there is still error "LLVM ERROR: Could not auto-detect compilation database for file, No compilation database found json-compilation-database: Error while opening JSON database: No such file or directory".
I get compile_commands.json in the /build. I use ln -s $PWD/compile_commands.json path/to/source/. It is still same error. I also copy compile_commands.json to current directory of the file which is prepared to analyze. Same error.

Can you give me some hits? What did I miss?

Thank you very much!

Sun

@rizsotto
Copy link
Owner

hi Sun,
thanks for your message. sorry, i can't tell why your program does not work. Bear implements the compilation database, according to its definition. if it is not correct, please reopen this ticket and write your findings.
regards,
Laszlo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants