1、./configure --with-boost=/usr/include
2、make
3、make install
4、运行thrift观察是否出现成功
[root@docong thrift-0.5.0]# thrift
Usage: thrift [options] file
Options:
-version Print the compiler version
-o dir Set the output directory for gen-* packages
(default: current directory)
-I dir Add a directory to the list of directories
searched for include directives
-nowarn Suppress all compiler warnings (BAD!)
-strict Strict compiler warnings on
-v[erbose] Verbose mode
-r[ecurse] Also generate included files
-debug Parse debug trace to stdout
--gen STR Generate code with a dynamically-registered generator.
STR has the form language[:key1=val1[,key2,[key3=val3]]].
Keys and values are options passed to the generator.
Many options will not require values.
Available generators (and options):
as3 (AS3):
bindable: Add [bindable] metadata to all the struct classes.
cocoa (Cocoa):
log_unexpected: Log every time an unexpected field ID or type is encountered.
cpp (C++):
pure_enums: Generate pure enums instead of wrapper classes.
dense: Generate type specifications for the dense protocol.
include_prefix: Use full include paths in generated files.
csharp (C#):
erl (Erlang):
hs (Haskell):
html (HTML):
java (Java):
beans: Members will be private, and setter methods will return void.
private-members: Members will be private, but setter methods will return 'this' like usual.
nocamel: Do not use CamelCase field accessors with beans.
hashcode: Generate quality hashCode methods.
javame (Java ME):
js (Javascript):
ocaml (OCaml):
perl (Perl):
php (PHP):
inlined: Generate PHP inlined files
server: Generate PHP server stubs
autoload: Generate PHP with autoload
oop: Generate PHP with object oriented subclasses
rest: Generate PHP REST processors
py (Python):
new_style: Generate new-style classes.
twisted: Generate Twisted-friendly RPC services.
rb (Ruby):
st (Smalltalk):
xsd (XSD):