<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><font class="Apple-style-span" color="#3F8288"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">Hello,</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">I'm running into some linking problems I can't seem to solve with libLLVMSystem.a (and other libraries)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000">The linker can find the symbol for: <span class="Apple-style-span" style="color: rgb(71, 0, 131); ">getOSAndEnvironmentName(), <span class="Apple-style-span" style="color: rgb(0, 0, 0); ">but not for: <span style="color: rgb(71, 0, 131); ">getDarwinNumber()</span></span></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">Here's a crude code snipit for example:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><font class="Apple-style-span" color="#3F8288"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><span style="color: #3f8288">llvm</span>::<span style="color: #7c22ab">Triple</span> triple;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><span style="color: #cc00a2">unsigned</span> a,b,c;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">triple.<span style="color: #470083">getDarwinNumber</span>(a, b, c);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><span style="color: #000000">triple.</span>getOSAndEnvironmentName<span style="color: #000000">();</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000">...and the link error is below at the end of this email.  I also get similar link errors for symbols like:</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">"llvm::StringMapImpl::FindKey(llvm::StringRef const&) const", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">       </span>llvm::StringMap<bool, llvm::MallocAllocator>::find(llvm::StringRef const&) constin libclangBasic.a(Targets.o)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; min-height: 16px; ">"llvm::raw_ostream::write(char const*, unsigned long)", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">       </span> llvm::raw_ostream::operator<<(llvm::StringRef const&)in libclangBasic.a(SourceManager.o)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; ">"llvm::BumpPtrAllocator::DefaultSlabAllocator", referenced from:</div></div></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; min-height: 16px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">      __ZN4llvm16BumpPtrAllocator20DefaultSlabAllocatorE$non_lazy_ptr in libclangBasic.a(SourceManager.o)</div></div></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000">Any help would be appreciated.</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000">Craig</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#000000"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Menlo; color: rgb(71, 0, 131); "><font class="Apple-style-span" color="#008B00"><font class="Apple-style-span" color="#000000"><br></font></font></div><div><font class="Apple-style-span" color="#008B00" face="Menlo" size="4"><span class="Apple-style-span" style="font-size: 14px; "><br></span></font></div><div><font class="Apple-style-span" color="#008B00" face="Menlo" size="4"><span class="Apple-style-span" style="font-size: 14px;"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">Ld build/Debug/testDocumentXML normal i386</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">cd /Users/craig/Desktop/testUsingClang</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">setenv MACOSX_DEPLOYMENT_TARGET 10.6</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">/Developer/usr/bin/llvm-g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/craig/Desktop/testUsingClang/build/Debug -L/Volumes/Untitled/Projects/llvm-trunk/Release/lib -L/Volumes/Untitled/Projects/llvm-clang/llvm/Debug/lib -F/Users/craig/Desktop/testUsingClang/build/Debug -filelist /Users/craig/Desktop/testUsingClang/build/testDocumentXML.build/Debug/testDocumentXML.build/Objects-normal/i386/testDocumentXML.LinkFileList -mmacosx-version-min=10.6 -framework Foundation /Volumes/Untitled/Projects/llvm-clang/llvm/Debug/lib/profile_rt.dylib /Volumes/Untitled/Projects/llvm-clang/llvm/Debug/lib/LLVMHello.dylib -lplugin_llvmc_Clang -lplugin_llvmc_Base -lLTO -lLTO -lLLVMXCoreInfo -lLLVMXCoreCodeGen -lLLVMXCoreAsmPrinter -lLLVMX86Info -lLLVMX86CodeGen -lLLVMX86AsmPrinter -lLLVMX86AsmParser -lLLVMTransformUtils -lLLVMTarget -lLLVMSystemZInfo -lLLVMSystemZCodeGen -lLLVMSystemZAsmPrinter -lLLVMSystem -lLLVMSupport -lLLVMSparcInfo -lLLVMSparcCodeGen -lLLVMSparcAsmPrinter -lLLVMSelectionDAG -lLLVMScalarOpts -lLLVMPowerPCInfo -lLLVMPIC16Info -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmPrinter -lLLVMPIC16CodeGen -lLLVMPIC16AsmPrinter -lLLVMMSP430Info -lLLVMMSP430CodeGen -lLLVMMSP430AsmPrinter -lLLVMMSILInfo -lLLVMMSIL -lLLVMMipsInfo -lLLVMMipsCodeGen -lLLVMMipsAsmPrinter -lLLVMMC -lLLVMLinker -lLLVMJIT -lLLVMipo -lLLVMipa -lLLVMInterpreter -lLLVMInstrumentation -lLLVMExecutionEngine -lLLVMDebugger -lLLVMCppBackendInfo -lLLVMCppBackend -lLLVMCore -lLLVMCodeGen -lLLVMCellSPUInfo -lLLVMCellSPUCodeGen -lLLVMCellSPUAsmPrinter -lLLVMCBackendInfo -lLLVMCBackend -lLLVMBlackfinInfo -lLLVMBlackfinCodeGen -lLLVMBlackfinAsmPrinter -lLLVMBitWriter -lLLVMBitReader -lLLVMAsmParser -lLLVMAsmPrinter -lLLVMARMInfo -lLLVMARMCodeGen -lLLVMARMAsmPrinter -lLLVMArchive -lLLVMAnalysis -lLLVMAlphaInfo -lLLVMAlphaCodeGen -lLLVMAlphaAsmPrinter -lGoogleTest -lCompilerDriver -lclangSema -lclangRewrite -lclangParse -lclangLex -lclangIndex -lclangFrontend -lclangDriver -lclangCodeGen -lclangBasic -lclangAST -lclangAnalysis -lCIndex -lCIndex -o /Users/craig/Desktop/testUsingClang/build/Debug/testDocumentXML</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; min-height: 16px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">ld: warning: llvm::cl::parser<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~parser()has different visibility (default) in /Volumes/Untitled/Projects/llvm-trunk/Release/lib/libLLVMSupport.a(CommandLine.o) and (hidden) in /Users/craig/Desktop/testUsingClang/build/testDocumentXML.build/Debug/testDocumentXML.build/Objects-normal/i386/Test.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">ld: warning: llvm::cl::opt<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, false, llvm::cl::parser<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~opt()has different visibility (default) in /Volumes/Untitled/Projects/llvm-trunk/Release/lib/libLLVMSupport.a(CommandLine.o) and (hidden) in /Users/craig/Desktop/testUsingClang/build/testDocumentXML.build/Debug/testDocumentXML.build/Objects-normal/i386/Test.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">Undefined symbols:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">  "llvm::Triple::getDarwinNumber(unsigned int&, unsigned int&, unsigned int&) const", referenced from:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">      MyObj::foo()     in Test.o</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">ld: symbol(s) not found</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; ">collect2: ld returned 1 exit status</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 14px/normal Menlo; min-height: 16px; "><br></div></span></font></div></body></html>