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