找回密码
 立即注册
收起左侧

qt+thrift项目编译问题

9
回复
10169
查看
[复制链接]
累计签到:56 天
连续签到:1 天
来源: 2016-1-6 09:39:20 显示全部楼层 |阅读模式
5Qter豆
我的环境是Windows 7 64位+ Qt 4.8.1+ Qt Creator 2.4.1,
以前一个项目用的是QT4+thrift。
thrift我是以头文件的形式直接加载进来的。
我把以前的项目打开进行编译的时候,重复报错如下:
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\idlprocess\reportCell_types.h:10: 错误:Thrift.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\idlprocess\reportCell_types.h:11: 错误:TApplicationException.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\idlprocess\reportCell_types.h:12: 错误:protocol/TProtocol.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\idlprocess\reportCell_types.h:13: 错误:transport/TTransport.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\spreadsheet.h:23: 错误:protocol/TBinaryProtocol.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\rptedit\ReportGui\spreadsheet.h:24: 错误:protocol/TDebugProtocol.h: No such file or directory
。。。。。
实际上这些thrift文件我都已经加载进来了
不知道有没有哪位大神用过这样的框架,请指教????


相关帖子

回复

使用道具 举报

累计签到:56 天
连续签到:1 天
2016-1-6 10:15:44 显示全部楼层
在项目文件的.pri文件里面包含这么一句话:include(../thriftcommon.pri)
回复

使用道具 举报

累计签到:1570 天
连续签到:1 天
2016-1-6 10:42:09 显示全部楼层
newqtlearner 发表于 2016-1-6 10:15
在项目文件的.pri文件里面包含这么一句话:include(../thriftcommon.pri)

thriftcommon.pri你有这个文件吗?
回复

使用道具 举报

累计签到:56 天
连续签到:1 天
2016-1-6 11:02:54 显示全部楼层
yafeilinux 发表于 2016-1-6 10:42
thriftcommon.pri你有这个文件吗?

没有这个文件。给的项目文件里面找不到该文件。
不知道大侠有没有这方面的经验?如何引用thrift。
回复

使用道具 举报

累计签到:1570 天
连续签到:1 天
2016-1-6 12:07:15 显示全部楼层
newqtlearner 发表于 2016-1-6 11:02
没有这个文件。给的项目文件里面找不到该文件。
不知道大侠有没有这方面的经验?如何引用thrift。
...

导入dll文件,然后包含相应头文件,就可以使用里面的方法了。具体可以百度下。
回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-1-6 16:34:11 显示全部楼层
你的第三方库不完整吧。当然编不过去了
回复

使用道具 举报

累计签到:56 天
连续签到:1 天
2016-1-7 08:59:22 显示全部楼层
sywh 发表于 2016-1-6 16:34
你的第三方库不完整吧。当然编不过去了

因为害怕路径加载错误,我在.pri文件里面把整个库文件加载进来了。INCLUDEPATH += D:\Qt\thrift\
报错信息又换成:
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\Makefile.Debug:523: 警告verriding commands for target `debug/reportTreeNode_types.o'
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\Makefile.Debug:466: 警告:ignoring old commands for target `debug/reportTreeNode_types.o'
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\Makefile.Debug:527: 警告verriding commands for target `debug/reportTreeNode_constants.o'
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\Makefile.Debug:470: 警告:ignoring old commands for target `debug/reportTreeNode_constants.o'
。。。。。
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\..\thrift\Thrift.h:24: 错误:thrift/windows/config.h: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\..\thrift\Thrift.h:48: 错误:boost/utility/enable_if.hpp: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\..\thrift\Thrift.h:49: 错误:boost/type_traits/is_convertible.hpp: No such file or directory
D:\Qt\qtcreator-2.4.1\rptedit-build-desktop-Qt_4_8_1__4_8_1____\..\..\thrift\ThriftObject.h:23: 错误:thrift/Thrift.h: No such file or directory
。。。实际上thrift/windows/config.h,Thrift.h等这些是这thrift文件夹下包含的。
boost/type_traits/is_convertible.hpp,boost/utility/enable_if.hpp这种文件确实没有看到。
回复

使用道具 举报

累计签到:595 天
连续签到:1 天
2016-1-8 08:44:36 显示全部楼层
少文件肯定是编不过的,你先把需要的库找齐
回复

使用道具 举报

累计签到:56 天
连续签到:1 天
2016-1-8 15:34:52 显示全部楼层
boost库文件已经找到了,编译好以后应该如何来用了??
回复

使用道具 举报

累计签到:56 天
连续签到:1 天
2016-1-10 22:57:35 显示全部楼层
yafeilinux 发表于 2016-1-6 10:42
thriftcommon.pri你有这个文件吗?

thrift库已经能用了,是引用路径不对。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了