[LLVMdev] newbie question regarding llvm-mingw

Ralf Schneider ralfs72 at googlemail.com
Thu May 1 06:06:07 PDT 2008


Am Donnerstag, den 01.05.2008, 14:48 +0400 schrieb Anton Korobeynikov:
> Hello, Ralf
> 
> > ERROR: Program used external function '__main' wich could not be
> > resolved!
> This was the bug fixed soon after 2.2 release.

Ok, thanks!

>  
> > I get the same error if I link the program with: "llvm-ld -v --stats
> > hello_world.bc -o hello_world.exe"
> > ... and execute the resulting "hello_world.exe"
> Right, because produced .exe just calls lli for bytecode execution.
> 
> > Only the standard c library? 
> See above, it really depends how you're producing the .exe.

I see - I have already discovered if I use the "--native" switch gcc is
internally called as an assembler to create the object/executable. 

Things getting much more clear now! My misunderstanding was: I thought
llvm-ld is a stand alone linker without any dependencies and can create
a executable by its own. And I was curious what libraries where
automatically (standard c library, ...) included during linking. But now
everything makes sense - because gcc does all the usual magic.

Thanks Anton!




More information about the llvm-dev mailing list