在linux中出现一下的报错
test_pc.c:(.text+0x2b7): undefined reference to `pthread_create'
test_pc.c:(.text+0x2d2): undefined reference to `pthread_create'
test_pc.c:(.text+0x2e5): undefined reference to `pthread_join'
test_pc.c:(.text+0x2f8): undefined reference to `pthread_join'
可以在编译时加上-lpthread,如图我创建的是一个test_pc.c的文件
gcc test_pc.c -lpthread -o test_pc