这一句: ret=pthread_create(&id2,NULL,(void*)myThread2.NULL);逗号写成了点号,改为: ret=pthread_create(&id2,NULL,(void*)myThread2, NULL);编译时加链接线程库:CC xx.c -o xx -lpthread