【发布时间】:2013-03-29 01:28:16
【问题描述】:
我正在尝试在我的 Windows 7 笔记本电脑上开发一个 websocket++ 服务器以方便使用(对vi 不好,不想经常 ftp)。最后我会迁移到 Ubuntu 12.10。
我正在使用 Visual C++ Win32 控制台应用程序项目。
我已经included websocketpp 目录,安装了 boost 1.53.0 How do you install Boost.Build on Windows? 和 included & linked boost Boost linking, Visual Studio & version control。
我正在尝试build print_server.cpp http://www.zaphoyd.com/websocketpp/manual/building-program-websocket
当我这样做时,我得到Error 1 error C2182: '*' : illegal use of type 'void' c:\boost_1_53_0\boost\smart_ptr\intrusive_ptr.hpp Line:155 Column:1
boost代码是(第二行是155):
T & operator*() const
{
BOOST_ASSERT( px != 0 );
return *px;
}
为什么会出现此错误?我该如何解决?
【问题讨论】:
-
实际的错误是not在Boost标头中,这是你使用Boost的方式。在某个地方,您可以在类型为
void的 Boost 智能指针上使用取消引用运算符。
标签: c++ visual-studio-2010 boost build-error websocket++