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
When compiling with cmake 3.25.1 I get this error:
/home/xyz/prjxray/lib/include/prjxray/segbits_file_reader.h:38:27: error: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Werror=deprecated-declarations]
38 | : public std::iterator<std::input_iterator_tag, value_type> {
| ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
from /usr/include/c++/12/memory:63,
from /home/xyz/prjxray/lib/include/prjxray/database.h:13:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [lib/CMakeFiles/libprjxray.dir/build.make:76: lib/CMakeFiles/libprjxray.dir/database.cc.o] Error 1
The text was updated successfully, but these errors were encountered:
This error message indicates that the code is using the std::iterator class, which has been marked as deprecated in the C++17 standard.
The deprecated warning is being treated as an error, which is causing the compilation to fail. A quick fix would be to remove the -Werror flag from add_compile_options(-Wall -Werror) in "prjxray/CMakeLists.txt'. The deprecated warning will no longer be treated as an error, and the compilation will not fail. Instead, the warning will be displayed as a message during compilation, and the build process will continue.
For a better long-term solution, the code needs to updated to use replacements for deprecated features.
When compiling with cmake 3.25.1 I get this error:
/home/xyz/prjxray/lib/include/prjxray/segbits_file_reader.h:38:27: error: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Werror=deprecated-declarations]
38 | : public std::iterator<std::input_iterator_tag, value_type> {
| ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
from /usr/include/c++/12/memory:63,
from /home/xyz/prjxray/lib/include/prjxray/database.h:13:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
127 | struct _GLIBCXX17_DEPRECATED iterator
| ^~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [lib/CMakeFiles/libprjxray.dir/build.make:76: lib/CMakeFiles/libprjxray.dir/database.cc.o] Error 1
The text was updated successfully, but these errors were encountered: