You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /root/OpenSiv3D/Linux/../Siv3D/include/Siv3D/StringView.hpp:370,
from /root/OpenSiv3D/Linux/../Siv3D/include/Siv3D/String.hpp:19,
from /root/OpenSiv3D/Linux/../Siv3D/include/Siv3D/Error.hpp:14,
from /root/OpenSiv3D/Siv3D/src/Siv3D-Platform/Linux/Siv3D/Siv3DMain.cpp:15:
/root/OpenSiv3D/Linux/../Siv3D/include/Siv3D/detail/StringView.ipp: In member function ‘constexpr s3d::StringView::size_type s3d::StringView::max_size() const’:
/root/OpenSiv3D/Linux/../Siv3D/include/Siv3D/detail/StringView.ipp:119:56: error: incomplete type ‘std::numeric_limits<long unsigned int>’ used in nested name specifier
119 | return std::numeric_limits<size_type>::max();
| ^~~
make[2]: *** [CMakeFiles/Siv3D.dir/build.make:76: CMakeFiles/Siv3D.dir/root/OpenSiv3D/Siv3D/src/Siv3D-Platform/Linux/Siv3D/Siv3DMain.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Siv3D.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
ビルド環境 | Develop environment (please complete the following information):
OS: Arch Linux
# gcc --version
gcc (GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the sourcefor copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# g++ --version
g++ (GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the sourcefor copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.
The following headers are used less widely in libstdc++ and may need to be included explicitly when compiled with GCC 11:
diff --git a/Siv3D/include/Siv3D/StringView.hpp b/Siv3D/include/Siv3D/StringView.hpp
index dfb4e5f..58005a4 100644
--- a/Siv3D/include/Siv3D/StringView.hpp+++ b/Siv3D/include/Siv3D/StringView.hpp@@ -19,6 +19,7 @@
# include <cassert>
# include <stdexcept>
# include <algorithm>
+# include <limits>
# include "Common.hpp"
# include "Utility.hpp"
# include "Hash.hpp"
In file included from /root/OpenSiv3D/Siv3D/src/Siv3D/SFMT/SivSFMT.cpp:12:
/root/OpenSiv3D/Linux/../Siv3D/include/ThirdParty/Xoshiro-cpp/XoshiroCpp.hpp:73:27: error: ‘size_t’ hasnot been declared
73 | template <size_t N>
|
エラーの内容 | Describe the build error
std::numeric_limits
が見つからないためコンパイルエラーになります。ビルド環境 | Develop environment (please complete the following information):
備考 | Additional context
gcc-11からヘッダーファイルの依存関係が整理され一部のヘッダーファイルを明示的にインクルードする必要性があるようです。
https://gcc.gnu.org/gcc-11/porting_to.html
wandboxで試したところgccのバージョンの違いでエラーになることが確認できました。
gcc-10.2.0
https://wandbox.org/permlink/2JO0W1zTQ10zdG6T
gcc-11.1.0
https://wandbox.org/permlink/WlaLI4k15pQK6ZXf
Siv3D/include/Siv3D/StringView.hpp
に以下の変更を加えることでコンパイルできるようになりました。自分の環境では完全にOpenSiv3dをビルドできていないのでエラー箇所がここのみか分かりませんが他にも明示的にインクルードしなければならない箇所があるかもしれません。
The text was updated successfully, but these errors were encountered: