Problems with tutorial

Thank you very much David,

http://clang.llvm.org/docs/JSONCompilationDatabase.html might provide some help.

This really worked.

After this, I tried to follow this other tutorial:
ttp://clang.llvm.org/docs/RAVFrontendAction.html

As in Step1, I put FindClassDecls.cpp in a directory called find-class-decls
in ~/clang-llvm/llvm/tools/clang/tools andc hanged the CMakeLists.txt in
tools. Then, I run ninja in ~/clang-llvm/build and I get the next error:

/home/pedro/clang-llvm/llvm/tools/clang/tools/find-class-decls/FindClassDecls.cpp:17:43:
error: member access into incomplete type ‘clang::ASTContext’

Looks like it needs “ASTContext.h” included.

I included clang/AST/ASTContext.h and i have now another kind of probem, as it can’t find anything:

tools/clang/tools/find-class-decls/CMakeFiles/find-class-decls.dir/FindClassDecls.cpp.o:(.data.rel.ro._ZTV20FindNamedClassAction[_ZTV20FindNamedClassAction]+0x14): undefined reference to `clang::ASTFrontendAction::ExecuteAction()’

… …

tools/clang/tools/find-class-decls/CMakeFiles/find-class-decls.dir/FindClassDecls.cpp.o:(.data.rel.ro._ZTV22FindNamedClassConsumer[_ZTV22FindNamedClassConsumer]+0x28): undefined reference to `clang::ASTConsumer::HandleTopLevelDeclInObjCContainer(clang::DeclGroupRef)’

… …

clang-3.3: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

What can I do? I’m not able to understand this error.

Thanks again,

Pedro

El dia 15 abr 2013 07:53, David Blaikie dblaikie@gmail.com escribió: