标签: xplane

“numeric_limits”不是“std”的成员

我正在尝试从源代码FlyWithLua编译一个应用程序,其中包括 sol2 库。

\n

我按照说明进行操作,但是当我运行时cmake --build ./build出现以下错误:

\n
In file included from /home/jon/src/FlyWithLua/src/FloatingWindows\n\n/FLWIntegration.cpp:10:\n/home/jon/src/FlyWithLua/src/third_party/sol2/./upstream/sol.hpp: In lambda function:\n/home/jon/src/FlyWithLua/src/third_party/sol2/./upstream/sol.hpp:7194:59: \n      error: \xe2\x80\x98numeric_limits\xe2\x80\x99 is not a member of \xe2\x80\x98std\xe2\x80\x99\n7194 |               std::size_t space = (std::numeric_limits<std::size_t>::max)();\n
Run Code Online (Sandbox Code Playgroud)\n

此后同一行上还有其他几个错误,但我想如果我能解决这个错误,它们可能就会消失。

\n

将以下包含添加到 .hpp 文件的解决方案存在几个类似的问题

\n
#include <stdexcept>\n#include <limits>\n
Run Code Online (Sandbox Code Playgroud)\n

sol.hpp文件包含以下导入:

\n
#include <stddef.h>\n#include <limits.h>\n
Run Code Online (Sandbox Code Playgroud)\n

https://sol2.readthedocs.io/en/latest/errors.html给出了一些关于编译器可能无法识别这些内容的提示,包括:

\n
\n

编译器错误/警告

\n

当出现问题时,可能会出现无数的编译器错误。以下是有关使用这些类型的一些基本建议:

\n
If there are a myriad of errors relating to std::index_sequence, type traits, \nand other std:: members, it is likely …
Run Code Online (Sandbox Code Playgroud)

c++ lua xplane

9
推荐指数
2
解决办法
3万
查看次数

标签 统计

c++ ×1

lua ×1

xplane ×1