我有Utils.h类声明:升压1.44.0 + VS2010私有成员错误
class Utils {
private:
static boost::mutex outputMutex;
};
在cpp文件:
boost::mutex Utils::outputMutex = boost::mutex();
我得到:
Error 1 error C2248: 'boost::mutex::mutex' : cannot access private member declared in class 'boost::mutex'
如果我们看里面boost/thread/win32/mutex.hpp
我们看到:
namespace boost
{
class mutex:
public ::boost::detail::underlying_mutex
{
// ...
public:
mutex()
{
initialize();
}
有没有人知道我在这里失踪?它用于在VS2008的另一台机器上编译OK。
谢谢。
这不是赋值,它是复制初始化。 – GManNickG 2010-10-21 01:54:38
这个工程。如果我没有记错(不确定),它需要VS2008中的任务。干杯:) – Mau 2010-10-21 02:50:49