Problems with tutorial

Thank you very much David, might provide some help.

This really worked.

After this, I tried to follow this other tutorial:

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:

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:([_ZTV20FindNamedClassAction]+0x14): undefined reference to `clang::ASTFrontendAction::ExecuteAction()’

… …

tools/clang/tools/find-class-decls/CMakeFiles/find-class-decls.dir/FindClassDecls.cpp.o:([_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,


El dia 15 abr 2013 07:53, David Blaikie escribió: