[LLVMdev]Linker error building (modified) lli

Reid Spencer reid at x10sys.com
Thu Feb 24 16:50:36 PST 2005


Hi Patrick,

You need to modify your makefile for building your version of lli so
that it includes the LLVMBCWriter.o library. You can do this with a line
like:

LLVM_LIBS=LLVMBCWriter

if you're using the LLVM Makefile system. Otherwise you just need to
make sure that {Debug,Release}/lib/LLVMBCWriter.o gets added to the link
line.

Reid.

On Thu, 2005-02-24 at 16:37, Patrick Meredith wrote:
> Linking lli debug executable (without symbols)
> /mounts/zion/disks/0/localhome/pmeredit/llvm/lib/Debug/lli-interpreter.o(.te
> xt+0x643a): In function
> `llvm::Interpreter::callExternalFunction(llvm::Function*,
> std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> >
> const&)':
> /localhome/pmeredit/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.c
> pp:98: undefined reference to `llvm::WriteBytecodeToFile(llvm::Module
> const*, std::basic_ostream<char, std::char_traits<char> >&)'
> collect2: ld returned 1 exit status
> make: *** [/mounts/zion/disks/0/localhome/pmeredit/llvm/tools/Debug/lli]
> Error 1
> 
> So, it's not linking in Writer.o, which is understandable since lli, as is,
> has no use for Writer.o. My question is where in this system of Makefiles
> are the object files to be linked into lli specified?  I've looked through
> all the Makefiles and I can't find anything :(
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050224/18d961c1/attachment.sig>


More information about the llvm-dev mailing list