编译时失败是因为: 缺少lpthread该库支持
所以编译时,这样编译即可解决线程创建函数为定义的引用
c语言:gcc xx.c -lpthread -o xx
c++语言:g++ xx.cpp -lpthread -o xx