1. 头文件中extern pthread_t 变量,没有包含pthread.h头文件。(我遇到的) 2.包含头文件时少写“#”号 3.定义函数 “{ ”处 打成 “;” 4.gcc 编译 C++文件。