C++ Google::glog在尝试登录时引发未指定的iostream_类别异常
这是我要运行的代码:C++ Google::glog在尝试登录时引发未指定的iostream_类别异常,c++,logging,glog,C++,Logging,Glog,这是我要运行的代码: 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
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;
}
如果删除LOGINFO行,则可以运行该程序。有人知道我为什么会出现异常吗?您可以尝试在LOGINFO行中设置断点
Exception: ios_base::clear: unspecified iostream_category error