/usr/lib/libclangFrontend.a(FrontendActions.cpp.o):在函数‘ clang::InitOnlyAction::CreateASTConsumer(
clang::CompilerInstance&, llvm::StringRef)’中:
(.text._ZN5clang14InitOnlyAction17CreateASTConsumerERNS_16CompilerInstanceEN4llvm9StringRefE+0x12):
对‘ vtable for clang::ASTConsumer ’未定义的引用 1
(下略)
链接参数应该是没问题的,按llvm-config --libs
和llvm-config --ldflags
来的,并添加到CMakeLists.txt
里的
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/lib -lLLVM-5.0")
/usr/lib/libclangFrontend.a(FrontendActions.cpp.o):在函数‘(anonymous namespace)::DumpModuleInfoListener::ReadFullVersionInformation(llvm::StringRef)’中:
(.text._ZN12_GLOBAL__N_122DumpModuleInfoListener26ReadFullVersionInformationEN4llvm9StringRefE+0x77):对‘clang::getClangFullRepositoryVersion[abi:cxx11]()’未定义的引用
(.text._ZN12_GLOBAL__N_122DumpModuleInfoListener26ReadFullVersionInformationEN4llvm9StringRefE+0x132):对‘clang::getClangFullRepositoryVersion[abi:cxx11]()’未定义的引用
1
nicevar 2018-01-05 15:06:52 +08:00
报的是虚函数问题,应该是有库链接不到,找一下继承 ASTConsumer 相关的
|