原来程序是可以在unix和windows下跑的,在原来的平台上fpos_t是和off_t或者long int等价的,所以下面的语句可以:
fpos_t m_nContentSize = 0
但是在ubuntu下编译时上面的语句出错:
错误: no match 为 ‘operator=’ 在 ‘((CFileFlow*)this)->CFileFlow::m_nContentSize = 0’ 中 4 /usr/include/_G_config.h:30: 附注: 备选为: _G_fpos_t& _G_fpos_t:: operator=(const _G_fpos_t&)
stdio.h中:
typedef _G_fpos_t fpos_t
_G_config.h中:
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
官方的Manual也是这么说的:
This is the type of an object that can encode information about the file position of a stream, for use by the functions fgetpos and fsetpos.
In the GNU system, fpos_t is an opaque data structure that contains internal data to represent file offset and conversion state information. In other systems, it might have a different internal representation.
想请问我的程序怎么样才能移植到Ubuntu上来呢?
程序迁移中关于fpos_t的问题
软件和网站开发以及相关技术探讨
前往
- 公告/注意事项
- ↳ 新闻和通知
- ↳ 软件推荐
- 系统安装
- ↳ 教学和常见问答
- ↳ 系统安装和升级
- ↳ 启动和引导
- ↳ 网卡无线拨号
- ↳ 硬件与内核
- ↳ 笔记本及便携设备
- ↳ Ubuntu衍生版
- ↳ 其他类Unix OS发行版
- ↳ Debian发行版
- 配置美化
- ↳ 中文显示和输入法
- ↳ 个人配置文件存放点
- ↳ 软件文档翻译
- ↳ 窗口管理器及美化
- ↳ 桌面展示
- 软件使用
- ↳ 办公、图像、机械电子设计等
- ↳ Vim和Emacs
- ↳ 开源模板库
- ↳ 互联网相关软件
- ↳ 影音多媒体
- ↳ 游戏和模拟器
- ↳ 虚拟机和虚拟化
- ↳ Wine及其分支
- ↳ 其它类软件
- 服务器管理
- ↳ 服务器运维
- ↳ 云计算和容器(K8S/KVM/Docker/WSL等)
- ↳ Ubuntu VPS
- 程序设计与开发
- ↳ Shell脚本
- ↳ 软件/网站开发
- ↳ 内核及嵌入式开发
- ↳ Ubuntu编译和打包
- ↳ 开源小工具
- ↳ 挑战任务
- 感想与交流
- ↳ 深度PK版
- ↳ Ubuntu故事和感慨
- ↳ 同城交流
- ↳ 校园社团
- ↳ 港澳台校区
- ↳ 国外校区
- 站务区
- ↳ 论坛管理
- ↳ Ubuntu中文网上商店