求助一个多线程的初级问题?
小弟现在正在学习linux下的多线程编程。可是照着书写了一个程序,在编译的时候却出现了下面的文题:
/tmp/cciK3B63.o(.text+0x93): In function `main':
: undefined reference to `pthread_creat'
collect2: ld returned 1 exit status
小弟用了gcc -D_REENTRANT -o pthread_create.out pthread_create.c -lpthread
和
gcc -pthread -o pthread_create.out pthread_create.c
这两个命令都不行,请问这是为什么?
好像是要安装什么开发库巴
请各位高手指点一二
感激不尽呀 你没加#include <pthread.h>吧
页:
[1]