C++ 以下错误的原因是什么?我们在编译Thrift C++;代码

C++ 以下错误的原因是什么?我们在编译Thrift C++;代码,c++,cassandra,thrift,C++,Cassandra,Thrift,thriftfs test$g++-lthrift-Wall thriftfs.cpp cassandra_constants.cpp cassandra.cpp cassandra_types.cpp-o thriftfs 在thriftfs.cpp中包含的文件中:7:0: Cassandra.h:10:24:致命错误:TProcessor.h:没有这样的文件或目录 编译终止。 在cassandra_constants.h:10:0中包含的文件中, 来自cassandra_常数。cpp:7:

thriftfs test$g++-lthrift-Wall thriftfs.cpp cassandra_constants.cpp cassandra.cpp cassandra_types.cpp-o thriftfs 在thriftfs.cpp中包含的文件中:7:0: Cassandra.h:10:24:致命错误:TProcessor.h:没有这样的文件或目录 编译终止。 在cassandra_constants.h:10:0中包含的文件中, 来自cassandra_常数。cpp:7: cassandra_types.h:10:20:致命错误:Thrift.h:没有这样的文件或目录 编译终止。 在Cassandra.cpp中包含的文件中:7:0: Cassandra.h:10:24:致命错误:TProcessor.h:没有这样的文件或目录 编译终止。 在cassandra_types.cpp中包含的文件中:7:0: cassandra_types.h:10:20:致命错误:Thrift.h:没有这样的文件或目录
编译终止

您必须包含包含目录的路径,例如:

thriftfs-test$ g++ -lthrift -Wall thriftfs.cpp cassandra_constants.cpp Cassandra.cpp cassandra_types.cpp -o thriftfs In file included from thriftfs.cpp:7:0: Cassandra.h:10:24: fatal error: TProcessor.h: No such file or directory compilation terminated. In file included from cassandra_constants.h:10:0, from cassandra_constants.cpp:7: cassandra_types.h:10:20: fatal error: Thrift.h: No such file or directory compilation terminated. In file included from Cassandra.cpp:7:0: Cassandra.h:10:24: fatal error: TProcessor.h: No such file or directory compilation terminated. In file included from cassandra_types.cpp:7:0: cassandra_types.h:10:20: fatal error: Thrift.h: No such file or directory compilation terminated.
您忘了在g++命令行中添加一些必需的include文件夹。

sooooooo,您是否已经排除了一些可能的原因,这样我们作为一个无偿服务就不会浪费宝贵的生命?。比如TProcessor.h在哪里?我有点感觉您甚至没有阅读错误消息,对吗?您丢失了一些文件。。。检查此项,程序应编译。
g++ -lthrift -I /path/to/thriftfs/include -Wall thriftfs.cpp cassandra_constants.cpp Cassandra.cpp cassandra_types.cpp -o thriftfs