"u8"未在此范围内声明
"u8" was not declared in this scope
我正在研究覆盆子派和红隼板(来自procerus technologies(之间的通信。现在,我需要从红隼的包装中接收信息,为此我使用的是 Gumstix 中使用的旧代码。在编译时,它给了我标题的错误("u8"未在此范围内声明(。该错误存在于多个文件中。例如
我想错误与Linux版本有关
#include "dllsetup.h"
#include "type.h"
#include <vector>
#include <linux/types.h>
#include <asm/types.h>
#include <sys/types.h>
#ifndef LINUX
EXTERN_LINK template class DYNAMIC_LINK std::vector<u8>;
#endif
//! Packet Data Type defines for easy writing of code.
typedef std::vector<u8> PacketData;
typedef std::vector<u8>::iterator PacketDataIter;
u8
不在标准中,但uint8_t
在标准中(包含在stdint.h
和cstdint
中(。检查您的包含,验证您是否在某处定义了u8
。
我正在查看<linux/types.h>
内核标头,但找不到u8
.有一个__u8
通过<asm/types.h>
拉入,通过另外两层内含物。
如果我编译
#include <linux/types.h>
u8 u;
在带有 gcc-7.3.0 的 Ubuntu 18 上,它表明了这一点。
test.c:2:1: error: unknown type name ‘u8’; did you mean ‘__u8’?
u8 u;
^~
__u8
相关文章:
- 错误:未在此范围内声明'reverse'
- 错误:"imread"未在此范围内声明
- 未在此范围内声明错误 'xy'
- Socklen_t未在此范围内声明
- 错误:'[' 之前预期的非限定 id 和错误:'users'未在此范围内声明
- "Main"已在当前范围内声明
- c++ 变量在宏的扩展中没有在这个范围内声明
- C++ 在编译过程中 strtok 函数 Eclipse 说没有在范围内声明?
- 'num1'未在此范围内声明
- 如何找到在本地范围内声明的变量的地址?
- NT状态未在此范围内声明
- 变量未在此范围内声明 数组线性搜索
- 包含文件中的 Typdef "未在此范围内声明"
- 'ClassName'和'ClassInstance'未在此范围内声明
- C++ 中的类之间的数据重新循环 - 错误:'<class name>'未在此范围内声明
- 代码作为 C 文件工作,但不作为C++文件,错误:'__builtin_types_compatible_p'未在此范围内声明
- 如何修复错误:"vreinterpretq_u32_f64"未在此范围内声明 - 在Android上使用Eigen构建
- 如何修复C++中的"arrStud未在此范围内声明"错误
- 错误:"SHGetKnownFolderPath"未在此范围内声明
- 错误:'Sprite'未在此范围内声明