blob: 576d0170277538660e26f13060db73fa6a726ba4 [file] [log] [blame]
Mark Slee54b7ab92007-03-06 00:06:27 +00001Thrift C++ Software Library
2
Bryan Duxburydef30a62009-04-08 00:19:37 +00003License
4=======
5
6Licensed to the Apache Software Foundation (ASF) under one
7or more contributor license agreements. See the NOTICE file
8distributed with this work for additional information
9regarding copyright ownership. The ASF licenses this file
10to you under the Apache License, Version 2.0 (the
11"License"); you may not use this file except in compliance
12with the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16Unless required by applicable law or agreed to in writing,
17software distributed under the License is distributed on an
18"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19KIND, either express or implied. See the License for the
20specific language governing permissions and limitations
21under the License.
Mark Slee54b7ab92007-03-06 00:06:27 +000022
23Using Thrift with C++
24=====================
25
26The Thrift C++ libraries are built using the GNU tools. Follow the instructions
27in the top-level README, or run bootstrap.sh in this folder to generate the
28Makefiles.
29
30In case you do not want to open another README file, do this:
31 ./bootstrap.sh
32 ./configure (--with-boost=/usr/local)
33 make
34 sudo make install
35
36Thrift is divided into two libraries.
37
38libthrift
39 The core Thrift library contains all the core Thrift code. It requires
40 boost shared pointers, pthreads, and librt.
41
42libthriftnb
43 This library contains the Thrift nonblocking server, which uses libevent.
44 To link this library you will also need to link libevent.
45
46Linking Against Thrift
47======================
48
49After you build and install Thrift the libraries are installed to
50/usr/local/lib by default. Make sure this is in your LDPATH.
51
52On Linux, the best way to do this is to ensure that /usr/local/lib is in
53your /etc/ld.so.conf and then run /sbin/ldconfig.
54
55Depending upon whether you are linking dynamically or statically and how
56your build environment it set up, you may need to include additional
57libraries when linking against thrift, such as librt and/or libpthread. If
58you are using libthriftnb you will also need libevent.
59
60Dependencies
61============
62
63boost shared pointers
64http://www.boost.org/libs/smart_ptr/smart_ptr.htm
65
66libevent (for libthriftnb only)
67http://monkey.org/~provos/libevent/