Linux Thrift hello world 编译报错 求助
好多 stdcxx里的错误
[gen-cpp]$ make
if [ ! -d ./obj ]; then mkdir -p ./obj; fi
if [ ! -d ./obj/src ]; then mkdir -p ./obj/src; fi
/opt/compiler/gcc-4.8.2/bin/g++ -c ./demo_server.cpp -o obj/./demo_server.o -I. -I/home/carlos/bin/thrift/include/ -I/home/carlos/bin/boost_1_49_0/include/
In file included from /home/carlos/bin/thrift/include/thrift/transport/TTransport.h:24:0,
from /home/carlos/bin/thrift/include/thrift/protocol/TProtocol.h:28,
from /home/carlos/bin/thrift/include/thrift/TProcessor.h:24,
from /home/carlos/bin/thrift/include/thrift/TDispatchProcessor.h:22,
from ./UserStorage.h:10,
from ./demo_server.cpp:1:
/home/carlos/bin/thrift/include/thrift/stdcxx.h:61:18: error: ‘std::bind’ has not been declared
using ::std::bind;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:62:18: error: ‘std::function’ has not been declared
using ::std::function;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:65:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_1;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:66:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_2;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:69:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_5;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:70:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_6;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:71:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_7;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:72:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_8;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:73:20: error: ‘std::placeholders’ has not been declared
using ::std::placeholders::_9;
^
In file included from /home/carlos/bin/thrift/include/thrift/transport/TTransport.h:24:0,
from /home/carlos/bin/thrift/include/thrift/protocol/TProtocol.h:28,
from /home/carlos/bin/thrift/include/thrift/TProcessor.h:24,
from /home/carlos/bin/thrift/include/thrift/TDispatchProcessor.h:22,
from ./UserStorage.h:10,
from ./demo_server.cpp:1:
/home/carlos/bin/thrift/include/thrift/stdcxx.h:111:16: error: ‘std::const_pointer_cast’ has not been declared
using ::std::const_pointer_cast;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:112:16: error: ‘std::dynamic_pointer_cast’ has not been declared
using ::std::dynamic_pointer_cast;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:113:16: error: ‘std::enable_shared_from_this’ has not been declared
using ::std::enable_shared_from_this;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:114:16: error: ‘std::make_shared’ has not been declared
using ::std::make_shared;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:115:25: error: expected unqualified-id before ‘using’
template <typename T> using scoped_ptr = std::unique_ptr<T>; // compiler must support template aliasing
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:116:16: error: ‘std::shared_ptr’ has not been declared
using ::std::shared_ptr;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:117:16: error: ‘std::static_pointer_cast’ has not been declared
using ::std::static_pointer_cast;
^
/home/carlos/bin/thrift/include/thrift/stdcxx.h:118:16: error: ‘std::weak_ptr’ has not been declared
using ::std::weak_ptr;
...
...
...
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual bool apache::thrift::transport::TBufferedTransport::isOpen()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:220:26: error: ‘transport_’ was not declared in this scope
bool isOpen() { return transport_->isOpen(); }
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual bool apache::thrift::transport::TBufferedTransport::peek()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:224:34: error: ‘transport_’ was not declared in this scope
setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_));
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual void apache::thrift::transport::TBufferedTransport::close()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:231:5: error: ‘transport_’ was not declared in this scope
transport_->close();
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual const string apache::thrift::transport::TBufferedTransport::getOrigin()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:243:50: error: ‘transport_’ was not declared in this scope
virtual const std::string getOrigin() { return transport_->getOrigin(); }
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: At global scope:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:294:11: error: ‘shared_ptr’ in namespace ‘apache::thrift::stdcxx’ does not name a type
virtual stdcxx::shared_ptr<TTransport> getTransport(stdcxx::shared_ptr<TTransport> trans) {
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:322:38: error: expected ‘)’ before ‘<‘ token
TFramedTransport(stdcxx::shared_ptr<TTransport> transport)
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:369:3: error: ‘shared_ptr’ in namespace ‘apache::thrift::stdcxx’ does not name a type
stdcxx::shared_ptr<TTransport> getUnderlyingTransport() { return transport_; }
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:410:3: error: ‘shared_ptr’ in namespace ‘apache::thrift::stdcxx’ does not name a type
stdcxx::shared_ptr<TTransport> transport_;
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In constructor ‘apache::thrift::transport::TFramedTransport::TFramedTransport()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:313:7: error: class ‘apache::thrift::transport::TFramedTransport’ does not have any field named ‘transport_’
: transport_(),
^
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual bool apache::thrift::transport::TFramedTransport::peek()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:350:46: error: ‘transport_’ was not declared in this scope
bool peek() { return (rBase_ < rBound_) || transport_->peek(); }
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual void apache::thrift::transport::TFramedTransport::close()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:354:5: error: ‘transport_’ was not declared in this scope
transport_->close();
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: In member function ‘virtual const string apache::thrift::transport::TFramedTransport::getOrigin()’:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:380:50: error: ‘transport_’ was not declared in this scope
virtual const std::string getOrigin() { return transport_->getOrigin(); }
^
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h: At global scope:
/home/carlos/bin/thrift/include/thrift/transport/TBufferTransports.h:433:11: error: ‘shared_ptr’ in namespace ‘apache::thrift::stdcxx’ does not name a type
virtual stdcxx::shared_ptr<TTransport> getTransport(stdcxx::shared_ptr<TTransport> trans) {
^
MakeFile 如下BINNAME = thrift_server
DEP_ROOT = ./
INTERFACE_ROOT = ./
INC_PATH = -I.
INC_PATH += -I/home/wangxiangxi/bin/thrift/include/
INC_PATH += -I/home/wangxiangxi/bin/boost_1_49_0/include/
LIB_PATH = -Llib
LIB_PATH += -L/home/wangxiangxi/bin/thrift/lib
CXX = /opt/compiler/gcc-4.8.2/bin/g++
OUTPUT_PATH = ./output
VERSION=${shell echo $$SCMPF_MODULE_VERSION}
LDFLAGS = -lthrift
OBJ_DIR = ./obj
SRC_DIR = .
SOURCES = $(wildcard $(SRC_DIR)/*.cpp)
OBJS = $(patsubst %.cpp, $(OBJ_DIR)/%.o, $(SOURCES))
all: objdir outputdir
objdir:
if [ ! -d $(OBJ_DIR) ]; then mkdir -p $(OBJ_DIR); fi
if [ ! -d $(OBJ_DIR)/src ]; then mkdir -p $(OBJ_DIR)/src; fi
outputdir: output
if [ ! -d $(OUTPUT_PATH) ]; then mkdir -p $(OUTPUT_PATH); fi
if [ ! -d $(OUTPUT_P ATH)/conf ]; then mkdir -p $(OUTPUT_PATH)/conf; fi
output: $(OBJS)
$(CXX) -o $(BINNAME) $(OBJS_BIDL) $(OBJS) $(INC_PATH) $(LIB_PATH) $(LDFLAGS)
$(OBJ_DIR)/%.o: %.cpp
$(CXX) -c $< -o $@ $(INC_PATH)
clean:
rm -f $(BINNAME)
用的boost 还得是 1.49.0 以前的 新版本没有 tr1 。。。
相关推荐
Docker一键搭建Hadoop+Spark+Hive本地大数据环境
大数据开发环境搭建是分布式计算入门的核心门槛,涉及Hadoop、Spark、Hive等组件的版本兼容、依赖冲突与网络配置。其底层原理在于容器化隔离运行时环境,通过Docker Compose编排服务依赖,解决端口绑定、跨容器通信、元数据存储(如MySQL替代Derby)等典型问题。该方案显著降低学习与验证成本,提供生产级栈的最小可行实现,广泛应用于课程设计、毕业设计、面试准备及SQL性能调优场景。尤其适合单机用户规避虚拟机开销与云服务计费,同时支撑Hive SQL执行、Spark Thrift Server
【雷达信号处理】数字下变频(DDC)(Matlab代码实现)
内容概要:本文围绕雷达信号处理中的数字下变频(DDC)技术,详细阐述了其在Matlab环境下的实现方法与工作原理。DDC作为雷达接收机中的核心技术,主要用于将高频中频信号高效转换为低频基带信号,以便于后续的数字信号处理。文章系统介绍了DDC的三大核心步骤:混频实现频谱搬移、低通滤波抑制带外噪声与干扰、以及抽取降低采样率以减轻数据处理负担。文中提供了完整的Matlab代码实例,并通过仿真结果直观展示了信号在时域和频域的变化过程,有效验证了DDC设计的正确性与有效性。该资源对于理解现代雷达与通信系统前端处理机制具有重要价值。; 适合人群:具备一定Matlab编程基础和数字信号处理理论知识的研究生、科研人员及工程技术人员。; 使用场景及目标:①深入学习和掌握数字下变频(DDC)的基本原理、数学模型及其实现流程;②利用Matlab对雷达或通信系统中的中频信号进行仿真处理与性能验证;③为信号检测、参数估计等后续高级处理算法提供高质量的基带信号预处理支持。; 阅读建议:在学习过程中,应结合提供的Matlab代码进行逐行调试与运行,重点观察混频、滤波和抽取每一环节对信号时域波形和频谱分布的影响。建议主动修改信号参数(如载频、带宽)和DDC系统参数(如滤波器截止频率、抽取因子),探究不同参数配置对信号保真度和处理效率的影响,从而深化对DDC技术细节的理解。
基于数据挖掘的京东商城商品推荐系统设计与实现(代码+数据库+LW)
摘 要 随着电商行业竞争加剧,京东商城商品品类激增,用户“信息过载”问题突出——传统货架式展示难以匹配个性化需求,致使用户购物效率低、平台转化率与粘性下滑。在此背景下,依托SpringBoot框架的快速开发特性与MySQL数据库的稳定存储能力,设计实现商品推荐系统,成为解决京东用户体验痛点、提升核心竞争力的关键。研究意义在于以“SpringBoot+MySQL”技术组合打破“人找货”传统模式,转向“货找人”精准服务;核心问题聚焦于借该技术架构整合用户与商品信息,实现个性化推荐功能与系统高效管理的协同落地。 研究以京东用户核心行为与商品关键属性为对象,采用“SpringBoot开发+MySQL存储+模块化开发”综合方法。具体步骤为:先搭建技术架构,基于SpringBoot设计分层开发结构,依托MySQL实现用户与商品信息的稳定存储及交互;再划分功能模块,用户模块涵盖注册登录、个人中心、禅选商品、订单管理等,满足个性化操作需求;管理员模块包含数据看板分析、预测信息管理、禅选商品管理等,支撑推荐效果监控与运营决策;最后构建推荐逻辑,结合用户行为特征与商品属性关联关系,实现商品精准匹配与需求趋势预判。 系统落地应用后核心成果显著:个性化推荐精准度大幅提升,有效减少用户筛选商品的时间成本;系统管理效率升级,管理员借MySQL实现信息高效交互,通过数据看板实时掌握用户偏好与推荐转化动态,预测功能可提前辅助运营决策;用户全流程体验改善,地址同步、客服聊天、收藏管理等功能形成服务闭环,增强用户平台粘性。综上,该系统依托技术优势解决京东“信息过载”与推荐低效问题,实现“个性化推荐+高效管理”双重目标,为商品运营优化提供支撑。模块化设计具备可扩展性,后续可基于现有架构迭代功能,适配更多电商场景。 关键词:个性化推荐,推荐系统,Spring Boot,MySQL
wxhook_产物_20261009
包含 wxhook_产物_20261009.zip 的资源包
海上水面目标检测数据集VOC+YOLO格式12316张10类别.md
亲爱的CSDN用户: 首先感谢你点进这个资源页面。我需要提前说明一个重要情况: **本资源原本已设置为“0积分下载”**,即作者希望完全免费共享。但CSDN平台有时会根据文件的下载热度、文件大小、用户权限等因素,**自动将部分资源的积分调整为非0数值**(如1积分、2积分、5积分等)。这是平台系统的自动行为,而非作者本人的设定。 **因此,如果你当前看到该资源的下载所需积分不是0(例如显示为1、2、3……),请谨慎决定是否下载。** 如果你按照非0积分支付并下载后发现资源内容不符合预期、链接失效,或者实际上该资源本应是免费的,作者无法为此承担积分损失或退还操作。**强烈建议:仅在页面显示为0积分时进行下载。** 另外,本资源描述中**并未直接提供具体的下载地址或外部链接**,因为它本身是一个通过CSDN官方上传通道提交的文件/内容包。如果你看到描述中没有外部网盘地址,这是正常的——资源文件应通过CSDN内置的“下载”按钮获取。若因平台积分显示异常导致你支付了积分,请优先联系CSDN客服咨询积分退还政策,作者没有权限修改平台自动设定的积分值。 感谢你的理解与支持。技术分享本应开放,但受限于平台规则,特此提醒如上。祝学习进步!


