[cfe-dev] libclangAST.so: undefined reference

Ryuta Suzuki ryuuta at gmail.com
Thu Jul 21 15:13:24 PDT 2011


Hi,

I've seen the the following undefined reference error for a while:

[ 94%] Built target gtest_main
Linking CXX executable AST/ASTTests
../../../lib/libclangAST.so: undefined reference to
`clang::Lexer::AdvanceToTokenCharacter(clang::SourceLocation, unsigned int,
clang::SourceManager const&, clang::LangOptions const&)'
../../../lib/libclangAST.so: undefined reference to
`clang::Lexer::LexTokenInternal(clang::Token&)'
../../../lib/libclangAST.so: undefined reference to
`clang::StringLiteralParser::init(clang::Token const*, unsigned int)'
../../../lib/libclangAST.so: undefined reference to
`clang::Lexer::getSourceLocation(char const*, unsigned int) const'
../../../lib/libclangAST.so: undefined reference to
`clang::Lexer::Lexer(clang::SourceLocation, clang::LangOptions const&, char
const*, char const*, char const*)'
../../../lib/libclangAST.so: undefined reference to
`clang::StringLiteralParser::getOffsetOfStringByte(clang::Token const&,
unsigned int) const'
collect2: ld returned 1 exit status
make[2]: *** [tools/clang/unittests/AST/ASTTests] Error 1
make[1]: *** [tools/clang/unittests/CMakeFiles/ASTTests.dir/all] Error 2

LLVM_USED_LIBS in clang/lib/AST/CMakeLists.txt may need to be updated?

Thanks,

Ryuta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110722/12ce4161/attachment.html>


More information about the cfe-dev mailing list