UINT64_C
来源:互联网 发布:ims 层次数据库 编辑:程序博客网 时间:2024/06/18 10:14
如题,我们在使用Eclipse for C++时,通过增加定义-D__STDC_CONSTANT_MACROS, 可以使编译通过,但CDT的智能提示却总是报错, 通过一番查找,在stdint.h头文件中发现了它的定义:
- /* The ISO C99 standard specifies that in C++ implementations these
- should only be defined if explicitly requested. */
- #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
- /* Signed. */
- # define INT8_C(c) c
- # define INT16_C(c) c
- # define INT32_C(c) c
- # if __WORDSIZE == 64
- # define INT64_C(c) c ## L
- # else
- # define INT64_C(c) c ## LL
- # endif
- /* Unsigned. */
- # define UINT8_C(c) c
- # define UINT16_C(c) c
- # define UINT32_C(c) c ## U
- # if __WORDSIZE == 64
- # define UINT64_C(c) c ## UL
- # else
- # define UINT64_C(c) c ## ULL
- # endif
- /* Maximal type. */
- # if __WORDSIZE == 64
- # define INTMAX_C(c) c ## L
- # define UINTMAX_C(c) c ## UL
- # else
- # define INTMAX_C(c) c ## LL
- # define UINTMAX_C(c) c ## ULL
- # endif
- #endif /* C++ && constant macros */
主要是这一句:
- #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
解决方案:
1. 右键单击 c++ 工程,Properties>>C/C++ General>>Paths and Symbols>>Symbols>>GNU C++>>Add
2. 在弹出的对话框中输入Name:__STDC_CONSTANT_MACROS Values: 1
再到程序中按F3,是不是可以找到UINT64_C了?
通过此方法,你可以增加其它的宏,以供智能识别程序识别。
0 0
- UINT64_C
- ffmpeg的UINT64_C 问题
- Function 'UINT64_C' could not be resolved
- ffmpeg error C3861: 'UINT64_C': identifier not foun
- 'UINT64_C' was not declared in this scope
- Function 'UINT64_C' could not be resolved
- ffmpeg遇到inttypes.h和UINT64_C
- ffmpeg遇到inttypes.h和UINT64_C
- ‘UINT64_C’ was not declared in this scope
- use of UINT64_C in libavutil/common.h
- ffmpeg: ‘UINT64_C’ was not declared in this scope
- error: 'UINT64_C' was not declared in this scope
- ffmpeg: ‘UINT64_C’ was not declared in this scope
- ffmpeg: ‘UINT64_C’ was not declared in this scope
- ffmpeg: ‘UINT64_C’ was not declared in this scope
- x264和FFMPEG 编译后遇到的一些问题:UINT64_C,
- ffmpeg: 'UINT64_C' was not declared in this scope
- x264和FFMPEG 编译后遇到的一些问题:UINT64_C,
- https://github.com/ldoublem/RingProgress
- mysql的分区分表
- Linux无线网卡的工作模式
- 将一个正整数分解质因数最简易明白的算法--java编写
- 【leetcode】412. Fizz Buzz
- UINT64_C
- android支付宝接入问题ali129
- http://jason.digitalinertia.net/dockered-dpdk-packaging-open-vswitch/
- Unity3D自学笔记——架构应用(六)角色创建
- 能让自己崇拜自己,就是成功
- android:layout_weight 设置控件的权重 ,子控件所占比例(公式如下)
- iOS-各种加密/解密算法
- 错排递推式推导
- 【VS开发】组播(多播)的C程序实战