如何在OS X使用clang编译器和链接器来使用pthread库?
对于GCC编译器,我知道使用-pthread选项可以设置适当的编译器/链接器选项,但是在OS X上使用clang时我不确定。
air:~ jose$ clang++ -c test.cpp -pthread
air:~ jose$ clang++ -o test -pthread test.o
clang: warning: argument unused during compilation: '-pthread'
air:~ jose$ g++ -c test.cpp -pthread
air:~ jose$ g++ -o test -pthread test.o