linux+eclipse+CDT编译多线程程序,出现这样的问题:
undefined reference to `pthread_create'undefined reference to `pthread_join'
原因是,pthread库不是系统默认的库,需要另行添加,解决方法如下:
Project->Properties->C/C++ Build->Settings->GCC C++ Linker->Libraries,添加pthread
转载于:https://www.cnblogs.com/dvss/archive/2013/04/17/3026570.html