dimanche 29 mars 2015

Easylogging 8.91 not compling without c++11

I want to use the library without C++11 but it won't compile for me: (Theoretically it should as per documentation @http://ift.tt/1IazFUd: "For lower version of C++ (non-C++11), please consider using Easylogging++ v8.91. ")


error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.


File structure:


./Main.cpp ./logger/easylogging++.h


Contents of Main.cpp:



#include "logger/easylogging++.h"
_INITIALIZE_EASYLOGGINGPP
using namespace std;

int main(int argc, char* argv[]) {
LINFO << "This is my first log";
return 0;
}


../src/logger/easylogging++.h: In function ‘std::string easyloggingpp::internal::threading::getCurrentThreadId()’: ../src/logger/easylogging++.h:691:16: error: ‘std::this_thread’ has not been declared ss << std::this_thread::get_id();


Compiler: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1), OS: Ubuntu 14.04 LTS


Aucun commentaire:

Enregistrer un commentaire