I am new to Thrift .
I am using CentOS, and "maybe" install Thrift succesfully.
I can use thrift to generate codes.
But Follow the instruction:
http://wiki.apache.org/thrift/ThriftUsageC%2B%2B I get the Error while
compile the Something_server.cpp Someone know pls help me to find out
the reason.
I have no idea. Thank you very much
I attach the error .
[root@localhost gen-cpp]# g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift
-o something
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI16(int16_t)â:
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: there are no
arguments to âhtonsâ that depend on a template parameter, so a declaration of
âhtonsâ must be available
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: (if you use
â-fpermissiveâ, G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI32(int32_t)â:
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:154: error: there are no
arguments to âhtonlâ that depend on a template parameter, so a declaration of
âhtonlâ must be available
Something_server.cpp: In member function âvirtual int32_t
SomethingHandler::ping()â:
Something_server.cpp:28: warning: no return statement in function returning
non-void
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI16(int16_t) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:401: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::writeI16_virt(int16_t) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: âhtonsâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI32(int32_t) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:405: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::writeI32_virt(int32_t) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:154: error: âhtonlâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::readI16(int16_t&) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:499: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::readI16_virt(int16_t&) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:362: error: ântohsâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::readI32(int32_t&) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:503: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::readI32_virt(int32_t&) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:373: error: ântohlâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI16(int16_t)â:
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: there are no
arguments to âhtonsâ that depend on a template parameter, so a declaration of
âhtonsâ must be available
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: (if you use
â-fpermissiveâ, G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI32(int32_t)â:
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:154: error: there are no
arguments to âhtonlâ that depend on a template parameter, so a declaration of
âhtonlâ must be available
Something_server.skeleton.cpp: In member function âvirtual int32_t
SomethingHandler::ping()â:
Something_server.skeleton.cpp:28: warning: no return statement in function
returning non-void
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI16(int16_t) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:401: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::writeI16_virt(int16_t) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.skeleton.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:147: error: âhtonsâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::writeI32(int32_t) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:405: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::writeI32_virt(int32_t) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.skeleton.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:154: error: âhtonlâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::readI16(int16_t&) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:499: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::readI16_virt(int16_t&) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.skeleton.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:362: error: ântohsâ was
not declared in this scope
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc: In member function
âuint32_t
apache::thrift::protocol::TBinaryProtocolT<Transport_>::readI32(int32_t&) [with
Transport_ = apache::thrift::transport::TTransport]â:
/usr/local/include/thrift/protocol/TVirtualProtocol.h:503: instantiated from
âuint32_t apache::thrift::protocol::TVirtualProtocol<Protocol_,
Super_>::readI32_virt(int32_t&) [with Protocol_ =
apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>,
Super_ = apache::thrift::protocol::TProtocolDefaults]â
Something_server.skeleton.cpp:42: instantiated from here
/usr/local/include/thrift/protocol/TBinaryProtocol.tcc:373: error: ântohlâ was
not declared in this scope
[root@localhost gen-cpp]#