C++ 发布编译节俭0.9.0 c++;客户
我曾尝试在ubuntu precise32上使用thrift 0.9.0编译cpp应用程序:C++ 发布编译节俭0.9.0 c++;客户,c++,ubuntu,thrift,C++,Ubuntu,Thrift,我曾尝试在ubuntu precise32上使用thrift 0.9.0编译cpp应用程序: g++ hello_client.cpp gen-cpp/HelloSvc.cpp -lthrift 然而,这导致: In file included from /usr/local/include/thrift/transport/TSocket.h:25:0, from hello_client.cpp:4: /usr/local/include/thrift/t
g++ hello_client.cpp gen-cpp/HelloSvc.cpp -lthrift
然而,这导致:
In file included from /usr/local/include/thrift/transport/TSocket.h:25:0,
from hello_client.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:107:3: error: 'uint32_t' does not name a type
...
我尝试通过以下方式修复0.9.0: 1) 安装Pythondev(我注意到一个错误:在构建thrift时缺少python.h) 2) 通过以下方式建立节俭:
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"
还是同样的错误,所以我决定签出、构建并安装最新的thrift(git中的HEAD版本6f2a5037105ccad05eb84ec0a60da3389c85eb3f)
使用最新的thrift,构建cpp客户端时没有错误。但是,运行a.out
返回错误:
./a.out: error while loading shared libraries: libthrift-1.0.0-dev.so: cannot open
shared object file: No such file or directory
将LD_LIBRARY_PATH设置为新建的旧图书馆修复了以下问题:
export-LD\u-LIBRARY\u-PATH=$LD\u-LIBRARY\u-PATH:$THRIFT\u SRC/lib/cpp/.libs/
我试图通过以下方式修复0.9.0:
1) 安装Pythondev(我注意到一个错误:在构建thrift时缺少python.h)
2) 通过以下方式建立节俭:
./configure CPPFLAGS="-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H"
还是同样的错误,所以我决定签出、构建并安装最新的thrift(git中的HEAD版本6f2a5037105ccad05eb84ec0a60da3389c85eb3f)
使用最新的thrift,构建cpp客户端时没有错误。但是,运行a.out
返回错误:
./a.out: error while loading shared libraries: libthrift-1.0.0-dev.so: cannot open
shared object file: No such file or directory
将LD_LIBRARY_PATH设置为新建的旧图书馆修复了以下问题:
export LD\u LIBRARY\u PATH=$LD\u LIBRARY\u PATH:$THRIFT\u SRC/lib/cpp/.libs/