Clang 替换 -mthreads 选项

Clang replacement for -mthreads option

当我使用 -mthreads 选项使用 clang 编译项目时,出现警告:argument unused during compilation '-mthreads'。在 clang 中是否有 -mthreads 的正确替换。或者在这种情况下我必须做什么才能正确编译项目。

您需要 -pthread 标志,而不是 -mthreads

PS:GCC 也使用该标志。