[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
Wink Saville
wink at saville.com
Sun Feb 26 20:02:15 PST 2006
Hello,
When I compile a "hello.c" program with a printf in "main" and use
llvm-gcc with a "-c" option:
llvm-gcc -c t1.c -o t1.bc
and then try to compile t1.bc to native using llc & gcc I get a call to
"__main" which is undefined.
If I don't use the "-c" option:
llvm-gcc t1.c -o t1
I don't get a reference to "__main" and I can compile to native without
problem. Also, I created some simple modules without a "main" and using
the "-c" option and that works as expected. What am I doing wrong?
Thanks,
Wink Saville
More information about the llvm-dev
mailing list