window环境下glog的安装

2020-12-13 13:49

阅读:333

  • #include "glog/logging.h"
    #include
    #include
    using namespace std;
    #pragma comment(lib,"libglog.lib")

    int main(int argc, char* argv[])
    {
    // Initialize Google‘s logging library.
    google::InitGoogleLogging(argv[0]);
    google::SetLogDestination(google::INFO, "E://");
    // 设置日志路径 INFO WARNING ERROR FATAL
    // ...
    char str[20] = "hello log!";
    LOG(INFO) LOG(INFO) LOG(WARNING) LOG(ERROR)

    system("pause");
    return 0;
    }

     

  • 评论


    亲,登录后才可以留言!