安装:http://www.tuicool.com/articles/m2EjQn
不是说源码安装boost库不行,可能是哪里没有设置好。
问题2:编译代码出现很多形如undefined reference to `apache::thrift::的错误
实例:http://blog.csdn.net/hbuxiaoshe/article/details/6558391
最后发现:-lthrift一定要放在后面
参考:http://my.oschina.net/zmlblog/blog/177245
例:
服务端编译:
g++ -g -I/usr/local/include/thrift -L/usr/local/lib/ Serv.cpp student_types.cpp student_constants.cpp Serv_server.skeleton.cpp -o server -lthrift
客户端编译:
g++ -g -I/usr/local/include/thrift -L/usr/local/lib/ -lm -pthread -lz -lrt -lssl Serv.cpp student_types.cpp student_constants.cpp client.cpp -o client -lthrift
最后,有一个很好的thrift C++实例:
http://blog.csdn.net/linyanwen99/article/details/8281508