• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

26.08.2023 TFS NEKIRO 7.72 <fmt> lib problem

Rondel

New Member
Joined
Feb 1, 2022
Messages
3
Reaction score
1
Hey, I've just followed the Compiling on Windows (vcpkg) (https://github.com/otland/forgottenserver/wiki/Compiling-on-Windows-%28vcpkg%29) tutorial. I've succesfully went through all the steps, however when I tried building the Nekiro 1.5 TFS 7.72 downgrade i've encountered few errors:

Code:
Severity    Code    Description    Project    File    Line    Suppression State
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (compiling source file ..\src\iomarket.cpp)    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1581   
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2079    '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1577   
Error    C2338    static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt' (compiling source file ..\src\iomapserialize.cpp)    theforgottenserver    C:\dev\vcpkg\installed\x64-windows\include\fmt\core.h    1581

The above erros in the picutre1693085123264.png

Any ideas how to fix that? Thank you in advance!
 
Solution
if someone have error -> 'auto' is not allowed here

do this code

C++:
namespace tfs {

#if __has_cpp_attribute(__cpp_lib_to_underlying)

    inline constexpr auto to_underlying(auto e) noexcept { return std::to_underlying(e); }

#else

    template<typename E>
    inline constexpr auto to_underlying(E e) noexcept -> std::underlying_type_t<E> {
        return static_cast<std::underlying_type_t<E>>(e);
    }

#endif

} // namespace tfs
 
Back
Top