阅读背景:

编译c++的节约代码来接口Cassandra会导致以下错误。这里少了什么?

来源:互联网 
         
    $ g++ -lthrift -Wall thriftfs.cpp cassandra_constants.cpp Cassandra.cpp cassandra_types.cpp -o thriftfs -I/usr/local/include/thrift -L/usr/local/lib


        In file included from /usr/local/include/thrift/protocol/TProtocol.h:23:0,
                         from /usr/local/include/thrift/TProcessor.h:24,
                         from Cassandra.h:10,
                         from t`enter code here`hriftfs.cpp:4:
        /usr/local/include/thrift/transport/TTransport.h:34:1: error: ‘uint32_t’ does not name a type

        /usr/local/include/thrift/transport/TTransport.h:156:29: error: ISO C++ forbids declaration of ‘buf’ with no type [-fpermissive]

        In file included from /usr/local/include/thrift/TProcessor.h:24:0,
                         from Cassandra.h:10,
                         from thriftfs.cpp:4:
        /usr/local/include/thrift/protocol/TProtocol.h:184:1: error: ‘uint32_t’ does not name a type

        In file included from Cassandra.h:10:0,
                         from thriftfs.cpp:4:
        /usr/local/include/thrift/TProcessor.h:72:57: error: ‘uint32_t’ has not been declared

        In file included from cassandra_types.h:11:0,
                         from Cassandra.h:11,
                         from thriftfs.cpp:4:
        /usr/local/include/thrift/TApplicationException.h:94:3: error: ‘uint32_t’ does not name a type

        In file included from Cassandra.h:11:0,
                         from thriftfs.cpp:4:
        cassandra_types.h:85:16: error: ‘uint8_t’ does not name a type
        In file included from Cassandra.h:11:0,
                         from thriftfs.cpp:4:
        cassandra_types.h:142:3: error: ‘uint32_t’ does not name a type

        In file included from Cassandra.h:11:0,
                         from thriftfs.cpp:4:
        cassandra_types.h:1478:16: error: ‘uint8_t’ does not name a type
        In file included from Cassandra.h:11:0,
                         from thriftfs.cpp:4:
        cassandra_types.h:1812:3: error: ‘uint32_t’ does not name a type

        In file included from thriftfs.cpp:4:0:
        Cassandra.h:217:3: error: ‘uint32_t’ does not name a type

        Cassandra.h:4857:35: error: ‘org::apache::thrift’ has not been declared
        Cassandra.h:4857:62: error: expected ‘,’ or ‘...’ before ‘*’ token
        Cassandra.h:4859:71: error: cannot declare pointer to ‘void’ member
        Cassandra.h:4859:145: error: template argument 2 is invalid
        Cassandra.h:4859:145: error: template argument 4 is invalid
        Cassandra.h:4860:45: error: ‘org::apache::thrift’ has not been declared
        Cassandra.h:4860:72: error: expected ‘,’ or ‘...’ before ‘*’ token

        Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
        Cassandra.h:4935:42: note: suggested alternative:
        /usr/local/include/thrift/Thrift.h:75:37: note:   ‘apache::thrift’
        Cassandra.h:4935:42: error: ‘thrift’ is not a member of ‘org::apache’
        Cassandra.h:4935:42: note: suggested alternative:
        /usr/local/include/thrift/Thrift.h:75:37: note:   ‘apache::thrift’
        Cassandra.h:4935:77: error: template argument 1 is invalid
        Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
        Cassandra.h:4935:105: note: suggested alternative:
        /usr/local/include/thrift/Thrift.h:75:37: note:   ‘apache::thrift’
        Cassandra.h:4935:105: error: ‘thrift’ is not a member of ‘org::apache’
        Cassandra.h:4935:105: note: suggested alternative:
        /usr/local/include/thrift/Thrift.h:75:37: note:   ‘apache::thrift’
        Cassandra.h:4935:140: error: template argument 1 is invalid
        Cassandra.h: In constructor ‘org::apache::cassandra::CassandraProcessor::CassandraProcessor(boost::shared_ptr)’:
        Cassandra.h:4898:49: error: assignment of read-only location ‘"login"[((org::apache::cassandra::CassandraProcessor*)this)->org::apache::cassandra::CassandraProcessor::processMap_]’
        Cassandra.h:4898:49: error: cannot convert ‘void (org::apache::cassandra::CassandraProcessor::*)(int32_t, int) {aka void (org::apach
         
    $ g++ -lthrift -Wall thriftfs.cpp



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: