क्या हैं ओएस एक्स में बजना साथ pthread लाइब्रेरी का उपयोग कर जीसीसी मुझे पता है कि उचित संकलक/लिंकर विकल्प सेट -pthread का उपयोग कर के साथओएस एक्स बजना -pthread
के लिए संकलक/लिंकर आवश्यकताओं, लेकिन मैं ओएस के बारे में अनिश्चित क्लैंग के साथ एक्स।
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
नमूना मैंने अभी जोड़ा है, ऐसा लगता है कि निष्पादन योग्य को लिंक करते समय क्लैंग की आवश्यकता नहीं है। –