undefined reference to `pthread_create'(‘pthread_create’未定义的引用codeblocks) 问题
版本:
CodeBlocks 10.05
在codeblocks下,菜单栏下Settings的Complier and Debugger
在连接器设置 (linker settings)下的链接库中加入libpthread.so,一般路径为/usr/lib/libpthread.so,本机的路径为/usr/lib/i386-linux-gnu/libpthread.so。如 果找不到可以在自己的电脑上搜索libpthread.so。
添加后重新编译工程,问题解决。