snappy库编译

版权声明:转载 请标注 出处 https://blog.csdn.net/youyou1543724847/article/details/84646119

1.下载源码,修改snappy-test.cc,添加头文件

#include <sys/times.h>
#include <sys/resource.h>
#include <unistd.h>

因为里面管理头文件的包含都是使用的条件编译包含,可能在某些架构、系统上并没有添加上去,需要自己添加上去。

  1. 安装编译依赖:yum install libstdc+±devel gcc-c++
  2. 编译:
  • 运行autogen.sh
  • 配置:./configure --build=arm-linux --prefix=输出文件所在目录
  • make
  • make install
    输出为so形式

猜你喜欢

转载自blog.csdn.net/youyou1543724847/article/details/84646119