Thursday, October 3, 2013

Using glogg

1) download an unzip glog
   C:\deletethis\glog-0.3.3\glog-0.3.3
2) In Project Properties > C/C++ > General > Additional Include Directories
   C:\deletethis\glog-0.3.3\glog-0.3.3\src\windows
3) In Project Properties > Linker > Input > Additional Dependencies
   libglog.lib
   In Project Properties > General > Additional Library Directories
   C:\deletethis\glog-0.3.3\glog-0.3.3\Debug
4) #include "glog\logging.h"
    int main(int argc, char* argv[])
   {
      FLAGS_log_dir = "C:/deletethis/testlog";
      google::InitGoogleLogging(argv[0]);

      LOG(INFO) << "Found " << 2 << " cookies";

      return 0;
   }