Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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