关于解决:VScode在Ubuntu中执行多线程程序时报错:undefined reference to pthread_create
目录问题解决方案方案一方案二
问题
VScode在Ubuntu中执行多线程程序时,您的环境中可能会出现类似下面的报错提示:
in function `main':
hw2_2.cpp:(.text+0x4d): undefined reference to `pthread_create'
/usr/bin/ld: hw2_2.cpp:(.text+0x5e): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit
原创
2021-10-05 15:38:58 ·
1874 阅读 ·
0 评论