| Mark Slee | 54b7ab9 | 2007-03-06 00:06:27 +0000 | [diff] [blame] | 1 | Thrift C++ Software Library | 
|  | 2 |  | 
|  | 3 | README Author: Mark Slee (mcslee@facebook.com) | 
|  | 4 | Last Modified: 2007-Mar-05 | 
|  | 5 |  | 
|  | 6 | Thrift is distributed under the Thrift open source software license. | 
|  | 7 | Please see the included LICENSE file. | 
|  | 8 |  | 
|  | 9 | Using Thrift with C++ | 
|  | 10 | ===================== | 
|  | 11 |  | 
|  | 12 | The Thrift C++ libraries are built using the GNU tools. Follow the instructions | 
|  | 13 | in the top-level README, or run bootstrap.sh in this folder to generate the | 
|  | 14 | Makefiles. | 
|  | 15 |  | 
|  | 16 | In case you do not want to open another README file, do this: | 
|  | 17 | ./bootstrap.sh | 
|  | 18 | ./configure (--with-boost=/usr/local) | 
|  | 19 | make | 
|  | 20 | sudo make install | 
|  | 21 |  | 
|  | 22 | Thrift is divided into two libraries. | 
|  | 23 |  | 
|  | 24 | libthrift | 
|  | 25 | The core Thrift library contains all the core Thrift code. It requires | 
|  | 26 | boost shared pointers, pthreads, and librt. | 
|  | 27 |  | 
|  | 28 | libthriftnb | 
|  | 29 | This library contains the Thrift nonblocking server, which uses libevent. | 
|  | 30 | To link this library you will also need to link libevent. | 
|  | 31 |  | 
|  | 32 | Linking Against Thrift | 
|  | 33 | ====================== | 
|  | 34 |  | 
|  | 35 | After you build and install Thrift the libraries are installed to | 
|  | 36 | /usr/local/lib by default. Make sure this is in your LDPATH. | 
|  | 37 |  | 
|  | 38 | On Linux, the best way to do this is to ensure that /usr/local/lib is in | 
|  | 39 | your /etc/ld.so.conf and then run /sbin/ldconfig. | 
|  | 40 |  | 
|  | 41 | Depending upon whether you are linking dynamically or statically and how | 
|  | 42 | your build environment it set up, you may need to include additional | 
|  | 43 | libraries when linking against thrift, such as librt and/or libpthread. If | 
|  | 44 | you are using libthriftnb you will also need libevent. | 
|  | 45 |  | 
|  | 46 | Dependencies | 
|  | 47 | ============ | 
|  | 48 |  | 
|  | 49 | boost shared pointers | 
|  | 50 | http://www.boost.org/libs/smart_ptr/smart_ptr.htm | 
|  | 51 |  | 
|  | 52 | libevent (for libthriftnb only) | 
|  | 53 | http://monkey.org/~provos/libevent/ |