尝试登录时,Google :: glog会抛出未指定的iostream_category异常

时间:2013-08-25 10:15:18

标签: 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.run();
    }
    catch (std::exception& e)
    {
        std::cerr << "Exception: " << e.what() << "\n";
    }

    return 0;
}

它编译好了,但是当我尝试运行它时,我会抛出这个异常:

Exception: ios_base::clear: unspecified iostream_category error

如果删除LOG(INFO)行,我可以运行该程序。任何人都知道为什么我得到例外?

0 个答案:

没有答案