【发布时间】:2013-05-18 06:42:36
【问题描述】:
$ cat test.c
int printf(const char *, ...);
int main() { printf("ok\n");}
$ clang -c test.c
$ llvm-ld test.o -o test /usr/lib/crt1.o -lSystem
$ ./test
'main' function not found in module.
$ ld test.o -o test /usr/lib/crt1.o -lSystem
$ ./test
ok
我正在尝试用clang编译这个简单的程序,然后用llvm-ld链接它,我的目标是避免使用GNU ld。我一定是以错误的方式使用它?
【问题讨论】:
标签: llvm