[LLVMdev] Question on link error

Chris Lattner sabre at nondot.org
Thu Feb 14 19:11:36 PST 2008


On Feb 14, 2008, at 6:54 PM, Ted Neward wrote:

> So I’ve built llvm-2.2 using Cygwin, and I think I’ve got all the  
> right bits in the right places, but I’m getting a strange error when  
> running through the hello.c examples from the Web site:

How did you create hello.s?  What version of llvm-gcc are you using?   
4.2?  Have you tried compiling hello.s to hello.native with llvm-gcc  
instead of gcc?

-Chris


>
> Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
> $ gcc hello.s -o hello.native
>
> Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
> $ ls
> hello.bc  hello.c*  hello.exe*  hello.native*  hello.s
>
> Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
> $ ./hello.native
> hello world
>
> Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
> $ lli hello.bc
> ERROR: Program used external function '__main' which could not be  
> resolved!
> Aborted
>
>
> Is there something Really Really Simple (TM) that I’m missing here?  
> AFAIK, __main is supposed to be inside hello.bc, so why can’t lli  
> find it?
>
>
>
> Ted Neward
> Java, .NET, XML Services
> Consulting, Teaching, Speaking, Writing
> http://www.tedneward.com
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.20.5/1278 - Release Date:  
> 2/14/2008 10:28 AM
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080214/0d25d6ee/attachment.html>


More information about the llvm-dev mailing list