LINUX下載編譯commoncpp/ucommon

  • 下載

http://ftp.gnu.org/gnu/commoncpp/

  • 解壓
  • 編譯commoncpp
BUILD_LIBS=${HOME}/build_libs
 
./configure \
     --prefix=${BUILD_LIBS}
 
make
make install
  • 編譯 ucommon
BUILD_LIBS=${HOME}/build_libs
 
./autogen.sh

./configure \
     --prefix=${BUILD_LIBS}
 
make
make install
  • 錯誤

提示找不到S_IREAD/S_IWRITE。打開applog.cpp,加入

#include <sys/stat.h>

  • 錯誤

無法解決,反覆嘗試修改,其他版本,都失敗。

In file included from object.cpp:21:0:
../inc/ucommon/object.h: In member function ‘const T* ucommon::sarray<T>::at(unsigned int) const’:
../inc/ucommon/object.h:298:64: error: no matching function for call to ‘ucommon::sarray<T>::get(unsigned int&) const’
         {return static_cast<const T*>(SparseObjects::get(offset));}
                                                                ^
../inc/ucommon/object.h:238:21: note: candidate: ucommon::ObjectProtocol* ucommon::SparseObjects::get(unsigned int) <near match>
     ObjectProtocol *get(unsigned offset);
                     ^~~
../inc/ucommon/object.h:238:21: note:   passing ‘const ucommon::sarray<T>*’ as ‘this’ argument discards qualifiers

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章