编译 thrift-0.14.2 的 C++ 版本

2021/9/5 11:06:33

本文主要是介绍编译 thrift-0.14.2 的 C++ 版本,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

编译命令:

./configure --prefix=/usr/local/thrift-0.14.2 --with-cpp=yes --with-php=no --with-python=no --with-qt5=no --with-c_glib=no --with-java=no --with-erlang=no --with-nodejs=no --with-nodets=no --with-lua=no --with-py3=no --with-perl=no --with-php_extension=no --with-dart=no --with-ruby=no --with-haskell=no --with-go=no --with-rs=no --with-swift=no --with-cl=no --with-haxe=no --with-netstd=no --with-d=no --enable-tests=no --with-as3=no --with-libevent=/usr/local/libevent --with-openssl=/usr/local/openssl --with-boost=/usr/local/boost

执行 configure 成功:

thrift 0.14.2

Building ActionScript3 Library : no
Building C (GLib) Library .... : no
Building C++ Library ......... : yes
Building Common Lisp Library.. : no
Building D Library ........... : no
Building Dart Library ........ : no
Building .NET Standard Library : no
Building Erlang Library ...... : no
Building Go Library .......... : no
Building Haskell Library ..... : no
Building Haxe Library ........ : no
Building Java Library ........ : no
Building Lua Library ......... : no
Building NodeJS Library ...... : no
Building Perl Library ........ : no
Building PHP Library ......... : no
Building Python Library ...... : no
Building Py3 Library ......... : no
Building Ruby Library ........ : no
Building Rust Library ........ : no
Building Swift Library ....... : no

C++ Library:
   C++ compiler .............. : g++ -std=c++11
   Build TZlibTransport ...... : yes
   Build TNonblockingServer .. : yes
   Build TQTcpServer (Qt5) ... : no
   C++ compiler version ...... : g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

注意

执行 configure 时需要指定参数:--with-boost=/usr/local/boost,虽然 0.14.2 版本的运行时库并不依赖 boost,只有测试用例依赖 boost,但如果不指定则不会生成 C++ 版本的库。另外只有指定了 libevent,才会生成库 libthriftnb.a 。



这篇关于编译 thrift-0.14.2 的 C++ 版本的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程