What is g++'s -pthread equiv in clang?
问题 I'm switching over from g++ to clang however, in g++, I have the -pthread flag, which clang does not seem to recognize. What is the equiv in clang? EDIT: My clang build is pulling from svn on March 5 2010. 回答1: Clang supports -pthread . May be in the latest builds, so update it and try again. 回答2: clang requires -pthread when compiling but not when linking. This is annoying, but it is observed behavior: $ clang -c x.cpp $ clang -pthread -c x.cpp $ clang -o x x.o $ clang -pthread -o x x.o