哪些是在OS X中使用並行線程庫鐺GCC的我都知道,使用-pthread設置相應的編譯器/連接器選項OS X鐺-pthread
編譯器/連接器的要求,但我不確定OS X與鐺。
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
應該完全一樣 - 我很確定。 –
http://stackoverflow.com/questions/2391194/what-is-gs-pthread-equiv-in-clang – DrYap
看到我剛添加的示例,似乎叮噹連接可執行文件時不需要-pthread。 –