c - 错误(DCC :1086):redeclaration of uint16_t

标签 c mingw

我的项目中有一个头文件包含这一行:

typedef unsigned short uint16_t;

在 MinGW 编译器中,有一个文件“stdint.h”也有相同的行:

typedef unsigned short  uint16_t;

编译时出现如下错误:

错误 (dcc:1086): 重新声明 uint16_t

谁能给我解释一下....我的意思是它们都是无符号短..

最佳答案

uint16_t 已在 stdint.h 中定义为无符号 16 位整数类型。你应该省略你的 typedef。

关于c - 错误(DCC :1086):redeclaration of uint16_t,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26505201/

相关文章:

c - _IO_puts 和动态指令计数

c - 我正确使用结构吗?

c++ - 编译酷项目中的语法错误

c++ - 从 MinGW 程序调用 Postgres 的最简单方法是什么?

performance - MinGW "make"启动速度非常慢

dll - g++:无法识别的选项 '-static-libstdc++'

c - 另一个 MinGW "gcc: error: CreateProcess: No such file or directory"

c++ - malloc 和 calloc 是如何以不同的签名结束的?

c - g_signal_connect "pad-added"不起作用

c - 对 C 结构中两个连续点的包装做出假设是否安全?