当前位置: 首页 > 工具软件 > UCommon > 使用案例 >

LINUX下载编译commoncpp/ucommon

寇甫
2023-12-01
  • 下载

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

 

 类似资料: