0

I tried to install "glog" but when I hit "make" the compilation fails with the following Error message:

src/logging_unittest.cc:1206:1: error: ‘FlagSaver’ was not declared in this scope src/logging_unittest.cc:1206:1: note: suggested alternative: /usr/local/include/gflags/gflags.h:277:23: note:
‘gflags::FlagSaver’ src/logging_unittest.cc:1206:1: error: expected ‘;’ before ‘fs’ make: *** [logging_unittest-logging_unittest.o] Error 1

I already installed gflags, but apparantly it is not able to find the functions installed along with gflags. Do I need to adapt my LD_LIBRARY_PATH ?

(I already tried to compile gflags from source with the option "-DGFLAGS_NAMESPACE=google" but it didn't help)

mcExchange
  • 6,154
  • 12
  • 57
  • 103

1 Answers1

3

After hours I could finally solve the problem. I used this version of gflags

wget https://github.com/schuhschuh/gflags/archive/master.zip

and compiled it using

unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC"
cmake .. -DGFLAGS_NAMESPACE=google
make 
sudo make install
mcExchange
  • 6,154
  • 12
  • 57
  • 103