acmilan作者
11年1个月前IP:四川
796045
13楼
如果想要移植到unix,那么使用tchar.h是必要的,虽然gcc不支持宽字符msvcrt函数,但是,你可以通过自己重新编写tchar.h来将这些函数重定向到窄字符版本。
如果想要移植到其它编译器(如mingw)但是不准备移植到unix,那么使用winapi会更好一些。

#ifdef _MSC_VER
#include <tchar.h>
#else
#include <tchar_posix.h> // 程序自己提供此头文件,它把tchar.h中的宏重定向到窄字符版本
#endif
评论
文号 / 796045

千古风流
名片发私信
学术分 4
总主题 466 帖总回复 2942 楼拥有证书:进士 学者 笔友
注册于 2009/05/30 21:22:42最后登录 2019/01/31 17:16:38
主体类型:个人
所属领域:无
认证方式:邮箱
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的