符号"符号"的偏移不一致
Offset of symbol 'Symbol' inconsistent
有人能用一个例子向我解释一下PC Lint错误38吗。。。
38 Offset of symbol 'Symbol' inconsistent (Location) -- A
member of a class or struct appears in a different
position (offset from the start of the structure) than an
earlier declaration. This could be caused by array
dimensions changing from one module to another.
我总是犯这样的错误。。。
Offset of symbol 'ClassX::access1' inconsistent (conflicts with line 92, file U:ABCABCApp.h, module U:ABCABCApp.cpp)
其中CCD_ 1是在CCD_ 3中声明的枚举CCD_。并且该枚举ACCESS
被定义在不同的头文件access.h
中。CCD_ 6包含在CCD_。
typedef enum
{
ACCESS_NONE = 0,
ACCESS_READ = 1
} ACCESS;
不确定这里出了什么问题。矛盾在哪里?
ACCESS
的定义,而在于access1
成员在类access1
0中的位置。您要么有该类的双重声明,要么(很可能)有一些流氓#pragma pack
,它在编译一个.cpp时有效,但在编译另一个.cpt时无效。
相关文章:
- 大于65535的C++数组[size]引发不一致的溢出
- 在 C++(和 C)中进行类型转换时明显不一致
- 填充上编译器生成的复制构造函数之间的不一致
- C4018:类内有符号、无符号不匹配
- 为函数定义符号不明确的指针参数
- 犰狳的 print() 方法和 cout 在从 Rcpp 调用时顺序不一致
- CreateDIBSection为同一图像返回不一致的位图位值
- 在 Qml 中从 QSqlTableModel 中删除单行时视图不一致
- 模板参数推导不一致
- 声明中不一致的no是否违反ODR?
- 如何删除分支因子不一致的树,最大为 30,40
- 从 C++ 函数与 Python 函数返回的不一致值用于偏斜正态分布
- 从 C 字符串构造 std::string 与从另一个 std::string 构造 std::string 不一致
- 这种比较是否不一致(或者存在其他问题)?
- 以下可变参数模板行为是否不一致?
- 如何修复我的链表读数不一致的问题?
- 在C++17中,为什么类模板和函数模板的指针类型推导明显不一致
- void 函数中的指针参数返回不一致的值
- 如何查找导致结果不一致的代码
- 符号"符号"的偏移不一致