blob: 27520bcfc9f49953b10243eeaea9ac9f772ba2f3 [file] [log] [blame]
Roger Meier84e4a3c2011-09-16 20:58:44 +00001Thrift C++ Software Library
2
3License
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.
22
23Using Thrift with C++
24=====================
25
26You need to define an enviroment variable called THIRD_PARTY. The project
27assumes that you have extracted the dependancies into their default structure
28into the path defined by THIRD_PARTY.
29
30e.g. $(THIRD_PARTY)/boost/boost_1_47_0/
31
32Thrift is divided into two libraries.
33
34libthrift
35 The core Thrift library contains all the core Thrift code. It requires
36 boost shared pointers and pthreads_win32.
37
38libthriftnb
39 This library contains the Thrift nonblocking server, which uses libevent.
40 To link this library you will also need to link libevent.
41
42You MUST apply this patch to make generated code compile.
43https://issues.apache.org/jira/browse/THRIFT-1139
44
45Linking Against Thrift
46======================
47
48You need to link your project that uses thrift against all the thrift
49dependancies; in the case of libthrift, pthreads_win32, boost and for
50libthriftnb, libevent.
51
52In the project properties you must also set HAVE_CONFIG_H as force include
53the config header: "windows/confg.h"
54
55Dependencies
56============
57
58boost shared pointers
59http://www.boost.org/libs/smart_ptr/smart_ptr.htm
60
61libevent (for libthriftnb only)
62http://monkey.org/~provos/libevent/
63
64pthreads win32
65http://sources.redhat.com/pthreads-win32/
66
67Known issues
68============
69
70- Endianess has not been fully tested, may not work with doubles.
71- Currently does not support the non-blocking connect path.
72- Only supports the creation of clients, server sockets are not yet ported.
73- Does not support named pipes. (Supported in unix through unix domain sockets).
74
75TODO
76====
77
78- Port remaining classes in libthrift:
79 - TFDTransport
80 - TFileTransport
81 - THttpClient
82 - THttpServer
83 - TSimpleFileTransport
84 - TSSLSocket
85
86- Port test cases. (Not even started this. Run test cases in release mode?)
87
88- Autolink libraries depending on debug\release build.
89
90- Auto versioning.