I try to use google-glog 0.3.3 in Linux Mint 17.1 as simple as follows,
#include <glog/logging.h>
int main(int argc, char* argv[]) {
google::InitGoogleLogging("TEST");
LOG(INFO) << "test";
}Then compile and run it: g++ test.cpp -o test -lglog; ./test
which gives runtime error: ./test: symbol lookup error: ./test: undefined symbol: _ZN6google10LogMessage6streamEv
I initially installed glog using mint's synaptic package manager. Later I also tried to build glog from source code, and run (after removing the glog package in system): g++ test.cpp -o test -L/path/to/build/glog-lib -lglog; ./test
which still gives the same runtime error.
Would please help me to fix it? It might also be related to the gflags library, since glog depends on gflags.