所以这是我试图运行的代码:
int main(int argc, char* argv[])
{
try
{
google::InitGoogleLogging(argv[0]);
boost::asio::io_service io_service;
LOG(INFO) << "Program started";
Server s(io_service, 7899);
io_service.run();
}
catch (std::exception& e)
{
std::cerr << "Exception: " << e.what() << "\n";
}
return 0;
}
它可以编译,但是当我尝试运行它时,我会抛出这个异常:
Exception: ios_base::clear: unspecified iostream_category error
如果我删除该LOG(INFO)
行,我可以运行该程序。任何人都知道为什么我会得到例外?