git clone https://github.com/google/glog.git/ .
or:
svn co https://github.com/google/glog.git/ .
windows: download cmake (www.cmake.org) generate cmake .sln file(glog.sln).
linux: cmake . && make && make install
simple testcase:
#if defined(WIN32)||defined(WINDOWS)
#error("Not supported")
#include <windows.h>
#include <io.h>
#include <direct.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#endif
#include <string.h>
#define GOOGLE_GLOG_DLL_DECL
#define GLOG_NO_ABBREVIATED_SEVERITIES
#include "glog/logging.h"
bool dirExists(const std::string& dirName_in)
{
return access(dirName_in.c_str(), F_OK) == 0;
}
#include <string>
#include <iostream>
void init_glog(const char*