- 下載下傳
- 解壓
- 編譯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