<div class="gmail_quote">On Mon, Jun 4, 2012 at 3:06 PM, Noah Evans <span dir="ltr"><<a href="mailto:noah.evans@gmail.com" target="_blank">noah.evans@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to compile remove-cstr-calls and I get the following linking errors:<br>
<br>
Noah-Evanss-MacBook-Pro:remove-cstr-calls npe$ make<br>
llvm[0]: Compiling RemoveCStrCalls.cpp for Debug+Asserts build<br>
llvm[0]: Linking Debug+Asserts executable remove-cstr-calls<br>
Undefined symbols for architecture x86_64:<br>
"clang::edit::Commit::insertFromRange(clang::SourceLocation,<br>
clang::CharSourceRange, bool, bool)", referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::Commit::remove(clang::CharSourceRange)", referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::Commit::replace(clang::CharSourceRange,<br>
llvm::StringRef)", referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::Commit::insert(clang::SourceLocation, llvm::StringRef,<br>
bool, bool)", referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::EditedSource::commit(clang::edit::Commit const&)",<br>
referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::EditedSource::applyRewrites(clang::edit::EditsReceiver&)",<br>
referenced from:<br>
__ZL11mergeFixitsN4llvm8ArrayRefIN5clang9FixItHintEEERKNS1_13SourceManagerERKNS1_11LangOptionsERNS_15SmallVectorImplIS2_EE<br>
in libclangFrontend.a(DiagnosticRenderer.o)<br>
"vtable for clang::edit::EditsReceiver", referenced from:<br>
clang::edit::EditsReceiver::EditsReceiver() in<br>
libclangFrontend.a(DiagnosticRenderer.o)<br>
NOTE: a missing vtable usually means the first non-inline virtual<br>
member function has no definition.<br>
"clang::edit::EditsReceiver::remove(clang::CharSourceRange)", referenced from:<br>
vtable for (anonymous namespace)::FixitReceiver in<br>
libclangFrontend.a(DiagnosticRenderer.o)<br>
"clang::edit::rewriteObjCRedundantCallWithLiteral(clang::ObjCMessageExpr<br>
const*, clang::NSAPI const&, clang::edit::Commit&)", referenced from:<br>
__ZL13checkCocoaAPIRN5clang4SemaEPKNS_15ObjCMessageExprE in<br>
libclangSema.a(SemaExprObjC.o)<br>
"clang::edit::Commit::Edit::getInsertFromRange(clang::SourceManager&)<br>
const", referenced from:<br>
__ZL18applyCocoaAPICheckRN5clang4SemaEPKNS_15ObjCMessageExprEjPFbS4_RKNS_5NSAPIERNS_4edit6CommitEE<br>
in libclangSema.a(SemaExprObjC.o)<br>
"clang::edit::Commit::Edit::getFileRange(clang::SourceManager&)<br>
const", referenced from:<br>
__ZL18applyCocoaAPICheckRN5clang4SemaEPKNS_15ObjCMessageExprEjPFbS4_RKNS_5NSAPIERNS_4edit6CommitEE<br>
in libclangSema.a(SemaExprObjC.o)<br>
ld: symbol(s) not found for architecture x86_64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>
make: *** [/Users/npe/src/llvm/Debug+Asserts/bin/remove-cstr-calls] Error 1<br>
<br>
It seems to come from not including libclangEdit.a in USEDLIBS, after<br>
I added libclangEdit.a to USEDLIBS the executable linked properly.<br>
Should clangEdit go into the CMakeLists.txt? Am I doing something<br>
wrong?<br></blockquote><div><br></div><div>I just merged mainline. Everything should compile fine now, as long as you use CMake. Let me know if there are still problems...</div><div><br></div><div>Thanks for reporting!</div>
<div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Noah<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>
</blockquote></div><br>