<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 12, 2014 at 9:50 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">It sounds like the order of libraries passed to the linker is incorrect. The inputs have to be sorted topologically, where each library appears before all of its dependencies.<div>
<br></div><div>Alternatively you can use --start-group ... --end-group to make it search out of order, but that shouldn't be necessary.</div></div></blockquote><div><br></div><div>I *think* there were circular deps that require specifying some libs multiple times. FWIW, the Makefile in my LLVM & Clang samples repo (<a href="https://github.com/eliben/llvm-clang-samples/blob/master/Makefile">https://github.com/eliben/llvm-clang-samples/blob/master/Makefile</a>) uses groups and it works great. It has proven much easier to maintain than following Clang's library deps (that kept breaking every month or so :-/)</div>
<div><br></div><div>Eli</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
</div><div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 12, 2014 at 6:58 AM, Kim <span dir="ltr"><<a href="mailto:soldoutseashell@gmail.com" target="_blank">soldoutseashell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'm trying to get my project (which uses clang) to build on linux and I'm running into a unresolved symbol error while loading one of the modules:<br>
<br>
undefined symbol: _<u></u>ZN5clang11ASTConsumer21HandleI<u></u>nterestingDeclENS_<u></u>12DeclGroupRefE<br>
<br>
Searching for the symbol in the clang/LLVM libraries indicates the symbol resides in libclangAST.a:<br>
<br>
./libclangAST.a<br>
0000000000000000 T _<u></u>ZN5clang11ASTConsumer21HandleI<u></u>nterestingDeclENS_<u></u>12DeclGroupRefE<br>
<br>
I'm already linking libclangAST.a into my project so I'm wondering what I'm missing or what the problem could be otherwise:<br>
<br>
LLVMLIBS = libLLVMProfileData.a libLLVMCppBackendCodeGen.a libLLVMX86CodeGen.a libLLVMX86AsmParser.a libLLVMX86Disassembler.a libLLVMBitWriter.a libLLVMIRReader.a libLLVMInstrumentation.a libLLVMipo.a libLLVMLinker.a libLLVMCppBackendInfo.a libLLVMX86Desc.a libLLVMXCoreDesc.a libLLVMAsmParser.a libLLVMBitReader.a libLLVMVectorize.a libLLVMAsmPrinter.a libLLVMSelectionDAG.a libLLVMMipsAsmPrinter.a libLLVMMipsInfo.a libLLVMX86AsmPrinter.a libLLVMX86Info.a libLLVMMCParser.a libLLVMCodeGen.a libLLVMX86Utils.a libLLVMObjCARCOpts.a libLLVMScalarOpts.a libLLVMInstCombine.a libLLVMTransformUtils.a libLLVMipa.a libLLVMAnalysis.a libLLVMTarget.a libLLVMCore.a libLLVMMC.a libLLVMObject.a libLLVMSupport.a libclangFrontendTool.a libclangAST.a libclangAnalysis.a libclangBasic.a libclangCodeGen.a libclangDriver.a libclangEdit.a libclangFrontend.a libclangLex.a libclangParse.a libclangSema.a libclangSerialization.a libclangStaticAnalyzerFrontend<u></u>.a libclangStaticAnalyzerCheckers<u></u>.a libclangStaticAnalyzerCore.a libclangARCMigrate.a libclangRewriteCore.a libclangRewriteFrontend.a libLLVMOption.a<br>
<br>
Thanks a lot<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>