??????????????
????$./configure
????$make
?????????????????????a.cpp??
????#include "snappy.h"
????#include <string>
????#include <iostream>
????int main() {
????std::string s = "ddsandslkadnsldsan;lkdsanf;ladnskal;fsan;lkfsjk;lfsna;lfdskfsa";
????std::string d;
????snappy::Compress(s.data()?? s.size()?? &d);
????std::cout<<d<<std::endl;
????std::cout<<s.size()<<" "<<d.size()<<std::endl;
????return 0;
????}
???????????У?
????libtool --mode=compile g++ -c a.cpp
????libtool --mode=link g++ -o test a.lo libsnappy.la
????./test
????rm test