with cpp, java, python
make install搞了N次,Ant总提示JAVA_HOME不对
最后看这篇博文[url]http://jayant7k.blogspot.com/2010/04/intro-to-thrift.html[/url]原来需要管理员权限,su一下,再export JAVA_HOME...
另外make自带的tutorial cpp的时候总提示undefined reference...
原来是G++版本的问题...最后我是用4.4.6版本搞定的
see http://mail-archives.apache.org/mod_mbox/thrift-user/201107.mbox/%3C4E3180C3.10204@ens-lyon.fr%3E
[quote]I also tried to compile with various g++ version:
g++ 4.4.6: OK
g++ 4.5.3: OK
g++ 4.6.1: complains about undefined reference to
`apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_1'
and undefined reference to
`apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_MASK'[/quote]
然后还得添加两个宏进去,thrift0.8.0真是开发中版本。。。。。
-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H
这两个宏都是定义在/usr/local/include/thrift/Thrift.h中的
[code]
g++ -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H -o CppClient -I/usr/local/include/thrift -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -L/usr/lib -lthrift CppClient.cpp ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp
[/code]
make install搞了N次,Ant总提示JAVA_HOME不对
最后看这篇博文[url]http://jayant7k.blogspot.com/2010/04/intro-to-thrift.html[/url]原来需要管理员权限,su一下,再export JAVA_HOME...
另外make自带的tutorial cpp的时候总提示undefined reference...
原来是G++版本的问题...最后我是用4.4.6版本搞定的
see http://mail-archives.apache.org/mod_mbox/thrift-user/201107.mbox/%3C4E3180C3.10204@ens-lyon.fr%3E
[quote]I also tried to compile with various g++ version:
g++ 4.4.6: OK
g++ 4.5.3: OK
g++ 4.6.1: complains about undefined reference to
`apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_1'
and undefined reference to
`apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_MASK'[/quote]
然后还得添加两个宏进去,thrift0.8.0真是开发中版本。。。。。
-DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H
这两个宏都是定义在/usr/local/include/thrift/Thrift.h中的
[code]
g++ -DHAVE_NETINET_IN_H -DHAVE_INTTYPES_H -o CppClient -I/usr/local/include/thrift -I/usr/include/boost -I../gen-cpp -L/usr/local/lib -L/usr/lib -lthrift CppClient.cpp ../gen-cpp/SharedService.cpp ../gen-cpp/shared_types.cpp ../gen-cpp/tutorial_types.cpp ../gen-cpp/Calculator.cpp
[/code]