file_trans.h中声明了void *filetrans()
file_trans.c中定义了void *filetrans()
test_file_trans.c中定义了main函数,并且#include "file_trans.h"
main函数中调用了pthread_create(&thread_id,NULL,filetrans,NULL);
编译:
gcc -o server test_file_trans.c -lpthread
报错
/tmp/ccWGFqTV.o: In function `main':
test_file_trans.c:(.text+0xa): undefined reference to `filetrans'
collect2: ld returned 1 exit status
这是怎么回事???
于 2012-12-09 09:33:14发表:
您好,请问您这个链接失败怎么解决的啊?
hml1006 于 2011-04-18 18:50:14发表:
zhongyugaoding
hml1006 于 2011-04-18 17:00:11发表:
编译成功,链接失败