Thrift动态库编译-创新互联
进入lib/cpp执行make 编译libthrift
站在用户的角度思考问题,与客户深入沟通,找到金凤网站设计与金凤网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:做网站、成都网站制作、企业官网、英文网站、手机端网站、网站推广、申请域名、虚拟空间、企业邮箱。业务覆盖金凤地区。1)./src/thrift/Thrift.h:48:39: fatal error: boost/utility/enable_if.hpp: No such file or directory
#include
解决 yum install boost-devel
2)/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_accept'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_shutdown'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_get_shutdown'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_CTX_ctrl'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `X509_NAME_ENTRY_get_data'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_get_error'
/opt/thrift-0.9.0/lib/cpp/.libs/libthrift.so: undefined reference to `SSL_CTX_free'
collect2: error: ld returned 1 exit status
make[1]: *** [Benchmark] 错误 1
make[1]: 离开目录“/opt/thrift-0.9.0/lib/cpp/test”
解决 修改编辑/opt/thrift-0.9.0/lib/cpp/test/Makefile文件,链接库-lrt -lpthread 添加 -lssl -lcrtypto
编译错误:语法支持问题
src/generate/t_rb_generator.cc: In member function ‘virtual void t_rb_generator::generate_enum(t_enum*)’:
src/generate/t_rb_generator.cc:359:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream
first ? first = false : f_types_ << ", ";
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/generate/t_rb_generator.cc:369:11: error: operands to ?: have different types ‘bool’ and ‘std::basic_ostream
first ? first = false : f_types_ << ", ";
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:749: thrift-t_rb_generator.o] Error 1
make[3]: Leaving directory '/home/dong/thrift-0.9.0/compiler/cpp'
解决
将 first ? first = false : f_types_ << ", ";
修改为
if(first)
{
first = false :
}
else
{
f_types_ << ", ";
}
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
分享标题:Thrift动态库编译-创新互联
文章起源:http://pwwzsj.com/article/dpgpoc.html