在ubuntu使用gcc编译时出现“pthread_create未定义的引用”问题。 解决如下:在编译时加入-l pthread。例如gcc thread.c -o thr -l pthread。原因:pthread不是linux的系统库。