在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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)