我只想在Mac OSX 10.8上使用Apple clang 4.1版(tag/Apple/clang-421.11.66)编译以下程序:
#include <thread>
using namespace std;
int main() {
cout << "Hello world";
}但我得到了:
../src/FirstCAgain.cpp:13:10: fatal error: 'thread' file not found
#include <thread>我启用了c++11支持,并且正在使用Eclipse C/C++开发工具。
问题是:如何在Mac上获得新的C++线程支持?
发布于 2013-01-06 06:39:35
您需要使用新的libc++,这不是默认的:
clang++ -stdlib=libc++ threadtest.cpp (当然,您还需要包含iostream,但我假设这不是您的困惑。)
https://stackoverflow.com/questions/14177018
复制相似问题