_int64 没有命名类型
在我的 pch 文件中,我有以下定义:
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
当我构建应用程序时,我收到一条错误,
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
指出 _int64 未命名类型。可能是什么问题?
In my pch file I have the following definitions:
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
When I build my application I get an error at
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
which says that _int64 does not name a type. What might be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
添加此包含
然后使用 uint64_t 或 int64_t。
见下文
Add this include
Then use uint64_t or int64_t.
see below
看来您正在尝试将 MSVC 特定的
__int64
类型与 GCC 一起使用。这不起作用,请改用long long
。It looks like you you are trying to use MSVC specific
__int64
type with GCC. That does not work, uselong long
instead.