ko4life-net / ko

Open source development of the game Knight Online. This is a reversed engineered old version of the game aiming to replicate the nostalgic experience we all once had <3
MIT License
48 stars 21 forks source link

Latest MSVC build tools breaks the build due to spdlog library errors #216

Closed stevewgr closed 2 months ago

stevewgr commented 2 months ago

Description

Updating to latest MSVC build tools breaks the build due to spdlog internal library errors.

To Reproduce

Update Visual Studio to the latest version and use the most recent build tools. When trying to build KnightOnLine project, the following errors will be produced:

Build started at 3:24 PM...
1>------ Build started: Project: KnightOnLine, Configuration: Debug Win32 ------
1>StdAfx.cpp
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(378,51): error C4996: 'stdext::checked_array_iterator<_Ty*>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.
1>(compiling source file 'StdAfx.cpp')
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\iterator(1470,35):
1>see declaration of 'stdext::checked_array_iterator'
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996: 'stdext::checked_array_iterator<T *>::checked_array_iterator': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         with
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         [
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:             T=fmt::v8::detail::bigint::bigit
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         ]
1>(compiling source file 'StdAfx.cpp')
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3):
1>the template instantiation context (the oldest one first) is
1>  C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format-inl.h(459,34):
1>  see reference to function template instantiation 'stdext::checked_array_iterator<T *> fmt::v8::detail::make_checked<T>(T *,size_t)' being compiled
1>        with
1>        [
1>            T=fmt::v8::detail::bigint::bigit
1>        ]

Tasks

Rebuild spdlog library with SPDLOG_USE_STD_FORMAT: https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/CMakeLists.txt#L90

and update ko-vendor assets.

Deliverables

stevewgr commented 2 months ago

Issue is now resolved and merged to master.

Closing.