무엇 OS에 대한 확신이 컴파일러/링커OS X의 그 소리는 -pthread
내가 적절한 컴파일러/링커 옵션을 설정 -pthread 사용하는 것을 알고 GCC와 OS X의에서 그 소리와는 pthread 라이브러리를 사용하기위한 요구 사항,하지만 난 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
정확하게 동일해야합니다 - 저는 꽤 확신합니다. –
http://stackoverflow.com/questions/2391194/what-is-gs-pthread-equiv-in-clang – DrYap
방금 추가 한 샘플을 보면 실행 파일을 연결할 때 clang이 -pthread를 필요로하지 않는 것으로 보입니다. –