简体   繁体   English

具有llvm和clang的架构x86_64的未定义符号

[英]Undefined symbols for architecture x86_64 with llvm and clang

I have a cpp file which is including some header files of OCLint. 我有一个cpp文件,其中包含OCLint的一些头文件。 Those header files internally includes clang and llvm headers like AST,ASTMatchers etc... 这些头文件内部包含clang和llvm头文件,例如AST,ASTMatchers等。

I have already specified the required header search path in the Build Settings as :- 我已经在“构建设置”中将所需的标题搜索路径指定为:-

../Downloads/clang+llvm-3.3-x86_64-apple-darwin12/include ../下载/clang+llvm-3.3-x86_64-apple-darwin12/include

But when I build I get the following error :- 但是当我构建时,出现以下错误:-

Undefined symbols for architecture x86_64: "llvm::RefCountedBaseVPTR::anchor()", referenced from: vtable for clang::ast_matchers::internal::matcher_isPublic0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_isProtected0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_isPrivate0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_hasAnyTemplateArgument0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_ignoringImpCasts0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_ignoringParenCasts0Matcher in File.o vtable for clang::ast_matchers::internal::matcher_ignoringParenImpCasts0Matcher in File.o ... "llvm::Regex::match(llvm::StringRef, llvm::SmallVectorImpl )", referenced from: clang::ast_matchers::internal::matcher_matchesName0Matcher::matches(clang::NamedDecl const&, clang::ast_matchers::internal::ASTMatchFinder , clang::ast_matchers::internal::BoundNodesTreeBuilder*) const in File.o "llvm::Regex::Rege 架构x86_64的未定义符号:“ llvm :: RefCountedBaseVPTR :: anchor()”,引用自:File.o中clang :: ast_matchers :: internal :: matcher_isPublic0Matcher的vtable,clang :: ast_matchers :: internal :: matcher_isProtected0Matcher的vtable File.o中的clang :: ast_matchers :: internal :: matcher_isPrivate0Matcher的File.o vtable File.o中的c。:: ast_matchers :: internal :: matcher_hasAnyTemplateArgument0Matcher o File.o中用于clang :: ast_matchers :: internal :: matcher_ignoringParenCasts0Matcher的vtable o o File.o中用于clang :: ast_matchers :: internal :: matcher_ignoringParenImpCasts0Matcher的vtable o ...“ llvm :: Regex :: match(llvm :: StringRef, llvm :: SmallVectorImpl )“,引用自:clang :: ast_matchers :: internal :: matcher_matchesName0Matcher :: matches(clang :: NamedDecl const&,clang :: ast_matchers :: internal :: ASTMatchFinder ,clang :: ast_matchers :: internal :: File.o中的BoundNodesTreeBuilder *)常量“ llvm :: Regex :: Rege x(llvm::StringRef, unsigned int)", referenced from: clang::ast_matchers::internal::matcher_matchesName0Matcher::matches(clang::NamedDecl const&, clang::ast_matchers::internal::ASTMatchFinder*, .......... etc ..... x(llvm :: StringRef,unsigned int)“,引用自:clang :: ast_matchers :: internal :: matcher_matchesName0Matcher :: matches(clang :: NamedDecl const&,clang :: ast_matchers :: internal :: ASTMatchFinder *,... .......等...

Did I forget to include some header search path ? 我是否忘了包含一些标题搜索路径?

Probably forgot to add dependent library. 可能忘记添加依赖库。 Add these and try again 添加这些,然后重试

-lLLVMCore -lLLVMSupport -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMMCJIT -lLLVMJIT -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMX86Desc -lLLVMX86Info -lLLVMTarget -lLLVMX86AsmPrinter -lLLVMMC -lLLVMObject -lLLVMX86Utils -lLLVMCore -lLLVMSupport -lLLVMCore -lLLVMSupport -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMMCJIT -lLLVMJIT -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMX86Desc -lLLVMX86Info -lLLVMTarget -lLLVMX86AsmPrinter -lLLVMMC -lLLVMObject -lLLVMX86Utils -lLLVMCore -lLLVMSupport

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 clang ++链接器未定义的符号,用于体系结构x86_64 - clang++ linker undefined symbols for architecture x86_64 架构x86_64的未定义符号: - Undefined symbols for architecture x86_64: 架构x86_64的未定义符号(2) - Undefined symbols for architecture x86_64 (2) undefined symbols架构x86_64的未定义符号:“_ kCFAllocatorDefault” - undefined symbols Undefined symbols for architecture x86_64: “_kCFAllocatorDefault” qt 5.4 / clang:体系结构x86_64的未定义符号(std :: istream :: gcount()) - qt 5.4/clang: Undefined symbols for architecture x86_64 (std::istream::gcount()) xcode 5.0架构x86_64错误和clang错误的未定义符号 - xcode 5.0 undefined symbols for architecture x86_64 error and clang error 使用 gtest 和 clang 12 编写单元测试时架构 x86_64 的未定义符号 - Undefined symbols for architecture x86_64 when writing unit tests with gtest and clang 12 带有gtest的clang mac链接错误体系结构x86_64的未定义符号 - clang mac link errors with gtest Undefined symbols for architecture x86_64 OSX clang++:架构 x86_64 的未定义符号,用于 cpp 文件中显式实例化的模板 - OSX clang++: Undefined symbols for architecture x86_64 for explicitely instantiated template in cpp file Cuda-体系结构x86_64 OS X的未定义符号 - Cuda - Undefined symbols for architecture x86_64 OS X
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM