2015-01-26 41 views
0

我試圖安裝「考勤記錄」,但是當我點擊「製作」編譯失敗,出現以下錯誤消息:出入記錄不會在Ubuntu 12.04編譯

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

我已經安裝GFLAGS,但apparantly它是無法找到與gflags一起安裝的功能。我是否需要修改我的LD_LIBRARY_PATH?

(我已經嘗試從與選擇源文件編譯GFLAGS「-DGFLAGS_NAMESPACE =谷歌」,但它並沒有幫助)

+0

哪些步驟將重現該問題編譯呢? – TheEYL 2015-01-26 19:36:33

回答

3

小時後我終於可以解決這個問題。我用這個版本GFLAGS

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

,並使用

unzip master.zip 
cd gflags-master 
mkdir build && cd build 
export CXXFLAGS="-fPIC" 
cmake .. -DGFLAGS_NAMESPACE=google 
make 
sudo make install