安卓-NDK-R7C "deque.h"中的非限定 ID 错误
android-ndk-r7c unqualified-id error in "deque.h"
我正在使用ndk r7c将一些Windows C++移植到ANSI,以便在Android 4.0.3上使用。
原始代码设置一个 UDP 客户端和一个数据包队列,它按设定的时间间隔检查,以便在程序在其他地方繁忙时队列填满,因此主程序不会占用轮询传入的数据包。代码相当长,所以我不会在这里发布它。
我不断收到消息:
In file included from C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/deque:65,
from C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/queue:61,
from jni/Tcan.h:5,
from jni/caneth_wrap.cpp:215:
C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h: In member function 'void std::_Deque_base<_Tp, _Alloc>::_M_initialize_map(size_t)':
C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/stl_deque.h:498: error: expected unqualified-id before '(' token
In file included from C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/deque:68,
from C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/queue:61,
from jni/Tcan.h:5,
from jni/caneth_wrap.cpp:215:
C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc: In member function 'void std::deque<_Tp, _Alloc>::_M_reallocate_map(size_t, bool)':
C:/Android/android-ndk-r7c/sources/cxx-stl/gnu-libstdc++/include/bits/deque.tcc:820: error: expected unqualified-id before '(' token
我以前在编码时见过非限定 id 消息,但从未找到导致它的明确答案。我尝试在Tcan.h的不同地方重新排列我的包含,没有帮助。Tcan.h:5是我#include <queue>
的地方。在 ndk 中是否有错误或遗漏了什么来弄乱队列?或者有谁知道这个错误的可能原因?
谢谢
编辑:使用ndk-r7b没有区别。我不认为会,但我想无论如何我都会检查。
max
可能是尚未声明的宏的问题:在此处检查第一篇文章(它大约是 3-arg 最大值,但问题似乎是一样的)。作为修复,您还可以尝试从 max
中删除 std::
前缀,如此处的第一篇文章所示。
相关文章:
- 我不断收到 [错误] ID 返回 1 退出状态错误,但看不到问题所在
- 方法内部但循环仍得到预期的不合格id错误C++
- Xcode 9.4.1 中的 Apple Mach-O 链接器 (id) 错误
- 错误:令牌 { '{' 之前应存在非限定 ID
- DCMTK 了解"DIMSE 没有有效的演示上下文 ID"错误
- C++中的"expected unqualified-id"错误是什么?
- c++ for 循环中预期的非限定 id 错误
- 在"." 令牌之前应为非限定 ID(C++ 错误)
- 预期"{"错误?以及预期的未指定 ID 错误?
- 错误:预期的非限定 ID 错误:含义和修复
- 安卓-NDK-R7C "deque.h"中的非限定 ID 错误
- 预期的不合格id错误,很可能是原因
- 意外的非限定 ID 错误
- C++中类出现预期的不合格id错误
- 出现意外的非限定id错误
- iOS中出现不合格的id错误
- XSLT到HTML的转换.Qt5中的generate-id()错误
- 不合格的id错误和井字游戏板不工作
- 传递结构体数组的预期非限定id错误
- 如何执行项目范围内的唯一id /错误代码,以便在源代码中轻松找到错误的来源