Closed GoogleCodeExporter closed 9 years ago
What exactly error have you encountered?
I am not sure how USEDLIBS option is passed to linker, but I can invoke
g++ [...] -lclangLex [...] -lclangEdit
when use prebuilt binaries. And IWYU is built successfully.
Original comment by vsap...@gmail.com
on 13 Jan 2013 at 9:13
Here's the exact error message:
--
/home/kimgr/dev/llvm/build/Debug+Asserts/lib/libclangEdit.a(Commit.o): In
function `clang::edit::Commit::canRemoveRange(clang::CharSourceRange,
clang::edit::FileOffset&, unsigned int&)':
/home/kimgr/dev/llvm/llvm/tools/clang/lib/Edit/Commit.cpp:308: undefined
reference to
`clang::PPConditionalDirectiveRecord::rangeIntersectsConditionalDirective(clang:
:SourceRange) const'
/home/kimgr/dev/llvm/build/Debug+Asserts/lib/libclangEdit.a(Commit.o): In
function
`clang::PPConditionalDirectiveRecord::areInDifferentConditionalDirectiveRegion(c
lang::SourceLocation, clang::SourceLocation) const':
/home/kimgr/dev/llvm/llvm/tools/clang/lib/Edit/../../include/clang/Lex/PPConditi
onalDirectiveRecord.h:83: undefined reference to
`clang::PPConditionalDirectiveRecord::findConditionalDirectiveRegionLoc(clang::S
ourceLocation) const'
/home/kimgr/dev/llvm/llvm/tools/clang/lib/Edit/../../include/clang/Lex/PPConditi
onalDirectiveRecord.h:83: undefined reference to
`clang::PPConditionalDirectiveRecord::findConditionalDirectiveRegionLoc(clang::S
ourceLocation) const'
collect2: ld returned 1 exit status
--
This is probably different between different toolchains. FWIW, my linker is:
GNU ld (GNU Binutils for Ubuntu) 2.22
Original comment by kim.gras...@gmail.com
on 13 Jan 2013 at 10:08
Interesting. On Mac OS X build succeeds both with "clangLex clangEdit" and with
"clangEdit clangLex". Have no objections against committing this patch.
Original comment by vsap...@gmail.com
on 14 Jan 2013 at 9:10
Fixed in r433. Volodymyr, I'm unsure how to close this, could you? I've updated
to this rev and built on my Ubuntu machine and it links as expected.
Original comment by kim.gras...@gmail.com
on 14 Jan 2013 at 8:51
"Fixed" status is one of closed statuses. So the issue is closed.
Original comment by vsap...@gmail.com
on 14 Jan 2013 at 8:58
Original issue reported on code.google.com by
kim.gras...@gmail.com
on 9 Jan 2013 at 9:14Attachments: