runtime symbol lookup error: undefined symbol, _ZN6google10LogMessage6streamEv

646 views
Skip to first unread message

Jeff chen

unread,
Feb 26, 2015, 1:20:20 PM2/26/15
to googl...@googlegroups.com

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.

Jonas Vervoort

unread,
Aug 11, 2016, 10:22:51 AM8/11/16
to google-glog
Maybe you forgot to set the dependencies in your CMAKE file:
set(CPACK_DEBIAN_PACKAGE_DEPENDS  "libgoogle-glog-dev)
Reply all
Reply to author
Forward
0 new messages