【发布时间】:2013-12-22 15:59:15
【问题描述】:
这项工作:
gcc a.o b.o -o a -lpthread
这不起作用:
gcc -lpthread a.o b.o -o a
并显示一些类似这样的错误:
undefined reference to `pthread_create'
所以当我使用 Makefile 编译时,它会生成
gcc -lpthread a.o b.o -o a
这不起作用。
有什么想法吗?
P.S:我使用的是 gcc 4.6.3/Ubuntu 12.04
【问题讨论】:
标签: gcc compiler-construction compiler-errors linker position