Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 VS Code 上使用带有 Code runner 的 Posix 线程时,我在 Linux 上遇到了一个错误,并且遇到了 undefined reference to pthread_create() 的错误;
要修复它,请在代码运行器 settings.json 中添加 -pthread 参数:
"cpp": "cd $dir && g++ $fileName -pthread -o $fileNameWithoutExt &&