我昨晚安装了xCode 4并试图编译一个应支持10.5及以上操作系统的软件.
它给出了错误消息"Base SDK missing".我发现10.5基本SDK不再出现在菜单中.
有没有办法获得基础SDK?有没有解决这个问题?
提前致谢.
我正在尝试使用C++ 11的std::thread类来运行类的成员函数以并行执行.
头文件的代码类似于:
class SomeClass {
vector<int> classVector;
void threadFunction(bool arg1, bool arg2);
public:
void otherFunction();
};
Run Code Online (Sandbox Code Playgroud)
cpp文件类似于:
void SomeClass::threadFunction(bool arg1, bool arg2) {
//thread task
}
void SomeClass::otherFunction() {
thread t1(&SomeClass::threadFunction, arg1, arg2, *this);
t1.join();
}
Run Code Online (Sandbox Code Playgroud)
我在Mac OS X 10.8.3下使用Xcode 4.6.1.我使用的编译器是Apple LLVM 4.2,它随Xcode一起提供.
上面的代码不起作用.编译器错误说明了这一点"Attempted to use deleted function".
在线程创建线上,它显示了以下按摩.
In instantiation of function template specialization 'std::__1::thread::thread<void (SomeClass::*)(bool, bool), bool &, bool &, FETD2DSolver &, void>' requested here
Run Code Online (Sandbox Code Playgroud)
我是C++ 11和线程类的新手.有人能帮助我吗?
我已经看到了一些不仅在下载后安装的dmg,而且还将安装程序复制到下载文件夹中并在安装程序应用程序中打开安装程序.
我不知道怎么办?
有人可以帮忙吗?