(*) hello.s was created as per what’s on the LLVM page:
Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
$ llc hello.bc -o hello.s
(*) gcc is llvm-gcc, compiled from the llvm-gcc-4.2 source tree:
Ted at XPLanguages /cygdrive/c/Projects/Exploration/llvm
$ gcc --version
gcc (GCC) 4.2.1 (Based on Apple Inc. build 5546) (LLVM build)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(*) Yes, I compiled hello.s -> hello.native using llvm-gcc, since that’s
what’s on the PATH ahead of the original Cygwin gcc. Hello.native also runs
just fine.
Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
HYPERLINK "http://www.tedneward.com"http://www.tedneward.com
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Chris Lattner
Sent: Thursday, February 14, 2008 7:12 PM
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Question on link error
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
HYPERLINK "http://www.tedneward.com"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
HYPERLINK "mailto:LLVMdev at cs.uiuc.edu"LLVMdev at cs.uiuc.edu
HYPERLINK
"http://llvm.cs.uiuc.edu"http://llvm.cs.uiuc.edu
HYPERLINK
"http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev"http://lists.cs.uiuc.edu/
mailman/listinfo/llvmdev
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.20.5/1278 - Release Date: 2/14/2008
10:28 AM
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20080214/8472af7f/attachment.html>